Contract 0xb94d1959084081c5a11c460012ab522f5a0fd756 5

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x8f11a7da4442681a76b478b078db194dce72d5431c4629533cc8252d308b09b5Deposit277137812022-10-01 5:36:4158 secs ago0xb543a1a08097fc5b5c6e8b7f80185232deb39416 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00001936
0xac2e44f6641125e302c244f79c1d7c035a2890102db3b4c3977cd421a70ed2fcDeposit277133082022-10-01 5:32:295 mins ago0xd646d13b0a687f72aea52281fb7fba518fdd5a3b IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002105
0xb2b0d194a4087301ea9c7625d5a7da0583573fe1c4981bcbd06a1a1690391204Deposit277132222022-10-01 5:31:376 mins ago0xb543a1a08097fc5b5c6e8b7f80185232deb39416 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002105
0xda88635679f91ae3b1b48d80ea832967dfda9093ef2bfcc25bc25c220fb9084bDeposit277129612022-10-01 5:29:368 mins ago0x4408e04e4d8aeb7edbc0bc0ae66028762fdf29e5 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00001924
0x6a01c21d74b45164621654e337dc7f831fda381c5b93e6a7ddc8246bd1d39653Harvest277089662022-10-01 4:54:4742 mins ago0x419684e4a857cbbfb478963c01525e0d4fda9dc2 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.0000146
0xc46ee78bc299fe0e8fe48de57424d8814893cfe2890711c9b46b3f2492860cdeDeposit277089422022-10-01 4:54:3743 mins ago0x4d82a8afdf423681b60811943015c26d0c796ae9 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00001566
0xc1d5f5de4f0db1ca67ede0eded10010586d2f289a61baa96695aadadadda6c1fWithdraw277089332022-10-01 4:54:3143 mins ago0x419684e4a857cbbfb478963c01525e0d4fda9dc2 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.0000175
0x023695338a383fe39e2d6f74a54e509f08419e0f6248fe9552a2397800590cfbDeposit277076762022-10-01 4:43:4853 mins ago0xff62787dd3ea3576a01e68b504ebe42ad3208bea IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002072
0x3ea1f9f70cb0a12bf91a4153cfec0c62e836aae90ae6064ec63b6cd2b3f459e8Compound277044022022-10-01 4:14:121 hr 23 mins ago0xad5509273d21f6f3e7a8bb9de306e6e573a84c04 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.0000138
0xaf275c3c80397a127210cd8e83915872d47b9ca229b8f3116be992452296771dDeposit277025462022-10-01 3:57:581 hr 39 mins ago0x41d5e53daa30941c4d72b31bf8e96d7f6de14b82 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002112
0x2b4b3e4b373e424b3e6f573890af022b8606e3b3adeeebce8a2977b09da1e339Deposit277018162022-10-01 3:52:311 hr 45 mins ago0x41d5e53daa30941c4d72b31bf8e96d7f6de14b82 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.0000229
0xa9fc4226194959dce1c045b1c6bd8720319b944a33a3a665863fa00d9090c6aeCompound277007412022-10-01 3:43:231 hr 54 mins ago0xe7be67b7114a356d5bca92133521b7db1ed28e88 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00001456
0x54781a843691d420a4101d922585300ae754792e177469106c9a4a8d9ec8957cDeposit276996772022-10-01 3:34:222 hrs 3 mins ago0x700674114d384a3fc17506e487053380ad77d463 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002157
0x4b0567ad9ad29dde2c1b69dab34e89d8db2d6f4dcca8149dfb88b77966dedf54Deposit276985732022-10-01 3:25:402 hrs 11 mins ago0xb82e12d1da436611c5c94d535c3a40f5fb3f35ab IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00001951
0x16a933e7dfa8f67f1997d99cee3524afcc46a296125b6184c99e7b4592ffea25Harvest276984192022-10-01 3:24:332 hrs 13 mins ago0xb82e12d1da436611c5c94d535c3a40f5fb3f35ab IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.0000192
0x11cb181d94f793725d159489438f687d74fa3adee73adb563d8601a053f3c632Compound276960322022-10-01 3:06:242 hrs 31 mins ago0x9bed44359c48f2532fda454d6cbfe136bd65c598 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00001643
0xe182e6cfd157e0e4a3acb172e2b798c59051d51def032c27552372f49a73dd54Deposit276950862022-10-01 2:58:122 hrs 39 mins ago0x4d82a8afdf423681b60811943015c26d0c796ae9 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.0000203
0x29d78dfca246f4aa6d49b4ce31cb96d9123fcdeb4529078a53f8b5de6a90c2d1Deposit276940942022-10-01 2:48:342 hrs 49 mins ago0x4d82a8afdf423681b60811943015c26d0c796ae9 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002081
0xe2444eb431435e8bcf9c5a08eb18ccdb2cb0d4f56d53f7e018feb17a8883eebcDeposit276938032022-10-01 2:45:422 hrs 51 mins ago0xf351a0614045d23917cb0ed5d2dda9d7589eabea IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002554
0xfb57525810b041576f601f03bf98ec4ee914b6a69b65d5dca1fe53fbd4fea8a9Deposit276924642022-10-01 2:34:213 hrs 3 mins ago0xda05d01bdbac32567561bb72d40e19bf4e80efe6 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002648
0xff061b4c968a9eeb4904a0430c9bda01fc4fcbb9d8dc67fd118cea872512d6a9Deposit276915062022-10-01 2:25:373 hrs 12 mins ago0x4d82a8afdf423681b60811943015c26d0c796ae9 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002199
0xb57edf802bddb9dcb7fefc94def8b7262fdf05f4519db9155f1f3a11ca0c79f4Deposit276895302022-10-01 2:04:333 hrs 33 mins ago0x4cedf18ff6e67817d37b889ec256e7c3a9ae32d6 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002386
0x4d3b716b43d31cebe029b190bd80a3579ac3d8083322d12718e6af668a6fac80Compound276867972022-10-01 1:36:204 hrs 1 min ago0x7d81787cf32263de005c2ba66f00369e4a99a639 IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002031
0x237abef4bb367066c218d2d02b09ca6326fafce86d91eac677b1b8bd69cd1bb9Harvest276831772022-10-01 0:53:164 hrs 44 mins ago0xc84c19bbf07d0cb7cc430fc3c51173c4acd5dd9d IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.0000237
0x4bcad2d42a491cb8e4f80335c7597a089f7827066a3f99757c0422840ca37339Withdraw276831522022-10-01 0:52:574 hrs 44 mins ago0xc84c19bbf07d0cb7cc430fc3c51173c4acd5dd9d IN  0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH0.00002627
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x8f11a7da4442681a76b478b078db194dce72d5431c4629533cc8252d308b09b5277137812022-10-01 5:36:4158 secs ago 0xb94d1959084081c5a11c460012ab522f5a0fd7560xe8ee01ae5959d3231506fcdef2d5f3e85987a39c0 ETH
0xac2e44f6641125e302c244f79c1d7c035a2890102db3b4c3977cd421a70ed2fc277133082022-10-01 5:32:295 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0xb2b0d194a4087301ea9c7625d5a7da0583573fe1c4981bcbd06a1a1690391204277132222022-10-01 5:31:376 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0xda88635679f91ae3b1b48d80ea832967dfda9093ef2bfcc25bc25c220fb9084b277129612022-10-01 5:29:368 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0x6a01c21d74b45164621654e337dc7f831fda381c5b93e6a7ddc8246bd1d39653277089662022-10-01 4:54:4742 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x808a84063a586e680b7699be20a4ec958adfdf860 ETH
0xc46ee78bc299fe0e8fe48de57424d8814893cfe2890711c9b46b3f2492860cde277089422022-10-01 4:54:3743 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x110a0f39b15d04f2f348b61bd741429c7d188d3f0 ETH
0xc1d5f5de4f0db1ca67ede0eded10010586d2f289a61baa96695aadadadda6c1f277089332022-10-01 4:54:3143 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0x023695338a383fe39e2d6f74a54e509f08419e0f6248fe9552a2397800590cfb277076762022-10-01 4:43:4853 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0xaf275c3c80397a127210cd8e83915872d47b9ca229b8f3116be992452296771d277025462022-10-01 3:57:581 hr 39 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd7560xe8ee01ae5959d3231506fcdef2d5f3e85987a39c0 ETH
0x540d9929f331f71f5fd09ca1acea13c94c1136f01a2a8fb6b4ab714219d6c073277022412022-10-01 3:55:411 hr 41 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x808a84063a586e680b7699be20a4ec958adfdf860 ETH
0x540d9929f331f71f5fd09ca1acea13c94c1136f01a2a8fb6b4ab714219d6c073277022412022-10-01 3:55:411 hr 41 mins ago Plutus DAO: Jones Staker 0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH
0x540d9929f331f71f5fd09ca1acea13c94c1136f01a2a8fb6b4ab714219d6c073277022412022-10-01 3:55:411 hr 41 mins ago Plutus DAO: Pending Rewards 0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH
0x2b4b3e4b373e424b3e6f573890af022b8606e3b3adeeebce8a2977b09da1e339277018162022-10-01 3:52:311 hr 45 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0x335575bc63aaca38fbd21be9c339f4f9e418b436c1d815458259c6b72688b585277017682022-10-01 3:52:041 hr 45 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x808a84063a586e680b7699be20a4ec958adfdf860 ETH
0x335575bc63aaca38fbd21be9c339f4f9e418b436c1d815458259c6b72688b585277017682022-10-01 3:52:041 hr 45 mins ago Plutus DAO: Jones Staker 0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH
0x335575bc63aaca38fbd21be9c339f4f9e418b436c1d815458259c6b72688b585277017682022-10-01 3:52:041 hr 45 mins ago Plutus DAO: Pending Rewards 0xb94d1959084081c5a11c460012ab522f5a0fd7560 ETH
0x54781a843691d420a4101d922585300ae754792e177469106c9a4a8d9ec8957c276996772022-10-01 3:34:222 hrs 3 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd7560xdf1a6dd4e5b77d7f2143ed73074be26c806754c50 ETH
0x4b0567ad9ad29dde2c1b69dab34e89d8db2d6f4dcca8149dfb88b77966dedf54276985732022-10-01 3:25:402 hrs 11 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0x16a933e7dfa8f67f1997d99cee3524afcc46a296125b6184c99e7b4592ffea25276984192022-10-01 3:24:332 hrs 13 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x808a84063a586e680b7699be20a4ec958adfdf860 ETH
0xe182e6cfd157e0e4a3acb172e2b798c59051d51def032c27552372f49a73dd54276950862022-10-01 2:58:122 hrs 39 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x110a0f39b15d04f2f348b61bd741429c7d188d3f0 ETH
0x29d78dfca246f4aa6d49b4ce31cb96d9123fcdeb4529078a53f8b5de6a90c2d1276940942022-10-01 2:48:342 hrs 49 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x110a0f39b15d04f2f348b61bd741429c7d188d3f0 ETH
0xe2444eb431435e8bcf9c5a08eb18ccdb2cb0d4f56d53f7e018feb17a8883eebc276938032022-10-01 2:45:422 hrs 51 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0xfb57525810b041576f601f03bf98ec4ee914b6a69b65d5dca1fe53fbd4fea8a9276924642022-10-01 2:34:213 hrs 3 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 Jones DAO: JONES Token0 ETH
0xff061b4c968a9eeb4904a0430c9bda01fc4fcbb9d8dc67fd118cea872512d6a9276915062022-10-01 2:25:373 hrs 12 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x110a0f39b15d04f2f348b61bd741429c7d188d3f0 ETH
0xb57edf802bddb9dcb7fefc94def8b7262fdf05f4519db9155f1f3a11ca0c79f4276895302022-10-01 2:04:333 hrs 33 mins ago 0xb94d1959084081c5a11c460012ab522f5a0fd756 0x110a0f39b15d04f2f348b61bd741429c7d188d3f0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MillinerV2

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : MillinerV2.sol
// SPDX-License-Identifier: GPL-3.0
/*                            ******@@@@@@@@@**@*                               
                        ***@@@@@@@@@@@@@@@@@@@@@@**                             
                     *@@@@@@**@@@@@@@@@@@@@@@@@*@@@*                            
                  *@@@@@@@@@@@@@@@@@@@*@@@@@@@@@@@*@**                          
                 *@@@@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@*                         
                **@@@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@@@**                       
                **@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@@@@@@@*                      
                **@@@@@@@@@@@@@@@@*************************                    
                **@@@@@@@@***********************************                   
                 *@@@***********************&@@@@@@@@@@@@@@@****,    ******@@@@*
           *********************@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@************* 
      ***@@@@@@@@@@@@@@@*****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@*********      
   **@@@@@**********************@@@@*****************#@@@@**********            
  *@@******************************************************                     
 *@************************************                                         
 @*******************************                                               
 *@*************************                                                    
   ********************* 
   
    /$$$$$                                               /$$$$$$$   /$$$$$$   /$$$$$$ 
   |__  $$                                              | $$__  $$ /$$__  $$ /$$__  $$
      | $$  /$$$$$$  /$$$$$$$   /$$$$$$   /$$$$$$$      | $$  \ $$| $$  \ $$| $$  \ $$
      | $$ /$$__  $$| $$__  $$ /$$__  $$ /$$_____/      | $$  | $$| $$$$$$$$| $$  | $$
 /$$  | $$| $$  \ $$| $$  \ $$| $$$$$$$$|  $$$$$$       | $$  | $$| $$__  $$| $$  | $$
| $$  | $$| $$  | $$| $$  | $$| $$_____/ \____  $$      | $$  | $$| $$  | $$| $$  | $$
|  $$$$$$/|  $$$$$$/| $$  | $$|  $$$$$$$ /$$$$$$$/      | $$$$$$$/| $$  | $$|  $$$$$$/
 \______/  \______/ |__/  |__/ \_______/|_______/       |_______/ |__/  |__/ \______/                                      
*/

pragma solidity ^0.8.2;

// Libraries
import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol";

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

// Milliner is the master of Hats.
contract MillinerV2 is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    using SafeCast for uint256;
    using SafeCast for int256;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        int256 rewardDebt; // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of JONES
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accJonesPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accJonesPerShare` (and `lastRewardSecond`) gets updated.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated. (can be set to negative, that means the user is owed that amount)
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. JONES to distribute per block.
        uint256 lastRewardSecond; // Last second number that JONES distribution occurs.
        uint256 accJonesPerShare; // Accumulated JONES per share, times 1e12. See below.
        uint256 currentDeposit; // Current deposited, fix from sushiswap to allow single staking of JONES
    }

    // The JONES TOKEN!
    IERC20 public jones;
    // JONES tokens created per second.
    uint256 public jonesPerSecond;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when JONES mining starts.
    uint256 public startTime;

    mapping(IERC20 => bool) public poolExistence;

    mapping(address => bool) public whitelistedContract;

    // Starts as the multisig but will pass to veJONES voter
    address public rewardManager;

    // Rewards contract
    HatDistributionCenter public hatDistributor;

    constructor(
        IERC20 _jones,
        uint256 _jonesPerSecond,
        uint256 _startTime,
        address _rewardManager,
        address _hatDistributor
    ) {
        if (_rewardManager == address(0)) {
            revert Zero_Address();
        }

        jones = _jones;
        jonesPerSecond = _jonesPerSecond;
        startTime = _startTime;
        rewardManager = _rewardManager;
        hatDistributor = HatDistributionCenter(_hatDistributor);
    }

    // ============================== View Functions ==============================

    /**
     * @return the current number of pools.
     */
    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    /**
     * View function to see deposited LP on frontend.
     * @param _pid The pool Id,
     * @param _user User address
     */
    function deposited(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        return userInfo[_pid][_user].amount;
    }

    /**
     * View function to see pending JONES on frontend.
     * @param _pid The pool Id,
     * @param _user User address
     */
    function pendingJones(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accJonesPerShare = pool.accJonesPerShare;
        uint256 lpSupply = pool.currentDeposit;
        if (block.timestamp > pool.lastRewardSecond && lpSupply != 0) {
            uint256 multiplier = _getMultiplier(
                pool.lastRewardSecond,
                block.timestamp
            );
            uint256 jonesReward = multiplier
                .mul(jonesPerSecond)
                .mul(pool.allocPoint)
                .div(totalAllocPoint);
            accJonesPerShare = accJonesPerShare.add(
                jonesReward.mul(1e12).div(lpSupply)
            );
        }
        return
            _calculatePending(user.rewardDebt, accJonesPerShare, user.amount);
    }

    // ============================== User Functions ==============================

    /**
     * Deposit LP tokens to Milliner for JONES allocation.
     * @param _pid pool Id
     * @param _amount amount to deposit
     */
    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
        _senderIsEligible();
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        if (_amount == 0) revert Zero_Amount();
        updatePool(_pid);
        _deposit(user, pool, _amount, false);
        emit Deposit(msg.sender, _pid, _amount);
    }

    /**
     * Withdraw LP tokens from Milliner.
     * @param _pid pool Id
     * @param _amount amount to withdraw
     */
    function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        if (user.amount < _amount) revert Not_Enough_Balance();
        if (_amount == 0) revert Zero_Amount();
        updatePool(_pid);

        // Send tokens
        pool.lpToken.safeTransfer(address(msg.sender), _amount);

        // Update variables
        user.rewardDebt =
            user.rewardDebt -
            int256(_amount.mul(pool.accJonesPerShare).div(1e12));

        user.amount = user.amount.sub(_amount);
        pool.currentDeposit -= _amount;
        emit Withdraw(msg.sender, _pid, _amount);
    }

    /**
     * @notice Harvest proceeds for transaction sender to `to`.
     * @param _pid The index of the pool. See `poolInfo`.
     */
    function harvest(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        uint256 pending = _calculatePending(
            user.rewardDebt,
            pool.accJonesPerShare,
            user.amount
        );

        if (pending > 0) {
            _safeJonesTransfer(msg.sender, pending);
        }
        user.rewardDebt = (user.amount.mul(pool.accJonesPerShare).div(1e12))
            .toInt256();
        emit Harvest(msg.sender, _pid, pending);
    }

    /**
     * @notice Compounds rewards into the pool (only available for single staking).
     * @param _pid The index of the pool.
     */
    function compound(uint256 _pid) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        if (address(pool.lpToken) != address(jones))
            revert Single_Staking_Only();
        updatePool(_pid);
        uint256 pending = _calculatePending(
            user.rewardDebt,
            pool.accJonesPerShare,
            user.amount
        );
        if (pending != 0) {
            _deposit(user, pool, pending, true);
        }
        user.rewardDebt = (user.amount.mul(pool.accJonesPerShare).div(1e12))
            .toInt256();
    }

    /**
     * Withdraw without caring about rewards. EMERGENCY ONLY.
     * @param _pid pool Id
     */
    function emergencyWithdraw(uint256 _pid) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        pool.currentDeposit = 0;
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    // ============================== Management Functions ==============================

    /**
     * Update reward variables of the given pool to be up-to-date.
     * @param _pid pool Id
     */
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];

        if (block.timestamp > pool.lastRewardSecond) {
            uint256 lpSupply = pool.currentDeposit;
            if (lpSupply > 0 && pool.allocPoint > 0) {
                uint256 blocks = _getMultiplier(
                    pool.lastRewardSecond,
                    block.timestamp
                );
                uint256 jonesReward = blocks
                    .mul(jonesPerSecond)
                    .mul(pool.allocPoint)
                    .div(totalAllocPoint);

                pool.accJonesPerShare = pool.accJonesPerShare.add(
                    jonesReward.mul(1e12).div(lpSupply)
                );
            }
            pool.lastRewardSecond = block.timestamp;
        }
    }

    /**
     * Update reward variables for all pools.
     * @dev Be careful of gas spending!
     */
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    /**
     * Create a new pool, Can only be called by the owner.
     * @param _allocPoint Allocation points for the pool. rate = (_allocPoint * rewardRate) / totalAlloc
     * @param _lpToken The lp token for the farm
     * @param _withUpdate If it should update the pools (almost all cases this should be tue)
     */
    function add(
        uint256 _allocPoint,
        IERC20 _lpToken,
        bool _withUpdate
    ) public onlyOwner nonDuplicated(_lpToken) {
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardSecond = block.timestamp > startTime
            ? block.timestamp
            : startTime;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolExistence[_lpToken] = true;
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardSecond: lastRewardSecond,
                accJonesPerShare: 0,
                currentDeposit: 0
            })
        );
        emit NewPool(address(_lpToken), poolInfo.length - 1, _allocPoint);
    }

    /**
     * Update the given pool's JONES allocation point and deposit fee. Can only be called by the owner.
     * @param _pid The pool Id,
     * @param _allocPoint Allocation points for the pool. rate = (_allocPoint * rewardRate) / totalAlloc
     * @param _withUpdate If it should update the pools (almost all cases this should be tue)
     */
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        bool _withUpdate
    ) public onlyRewardsManager {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
        emit PoolUpdate(_pid, _allocPoint);
    }

    /**
     * Updates the reward rate per second from now on.
     * @param _jonesPerSecond new rate
     */
    function updateEmissionRate(uint256 _jonesPerSecond) public onlyOwner {
        massUpdatePools();
        jonesPerSecond = _jonesPerSecond;
        massUpdatePools();
        emit UpdateEmissionRate(_jonesPerSecond);
    }

    /**
     * Migrates all rewards to another contract.
     * @dev to be used only in emergencies
     * @param _amount amount to be sent out
     * @param _to address to send the rewards to
     */
    function migrateRewards(uint256 _amount, address _to) public onlyOwner {
        jones.safeTransfer(_to, _amount);
    }

    /**
     * Adds contract to whitelist.
     * @param _contractAddress contract address
     */
    function addContractAddressToWhitelist(address _contractAddress)
        public
        virtual
        onlyOwner
    {
        whitelistedContract[_contractAddress] = true;
    }

    /**
     * Removes contract from whitelist.
     * @param _contractAddress contract address
     */
    function removeContractAddressFromWhitelist(address _contractAddress)
        public
        virtual
        onlyOwner
    {
        whitelistedContract[_contractAddress] = false;
    }

    function updateRewardsManager(address _newManager)
        public
        virtual
        onlyOwner
    {
        rewardManager = _newManager;
    }

    function updateHatDistributor(address _distributor)
        public
        virtual
        onlyOwner
    {
        if (_distributor == address(0)) {
            revert Zero_Address();
        }

        hatDistributor = HatDistributionCenter(_distributor);
    }

    // ============================== Internal Functions ==============================

    // Return reward multiplier over the given _from to _to timestamp.
    function _getMultiplier(uint256 _from, uint256 _to)
        private
        pure
        returns (uint256)
    {
        return _to.sub(_from);
    }

    // Safe jones transfer function, just in case if rounding error causes pool to not have enough JONES.
    function _safeJonesTransfer(address _to, uint256 _amount) internal {
        hatDistributor.sendRewards(_amount, _to);
    }

    // Deposits and updates state variables
    function _deposit(
        UserInfo storage _user,
        PoolInfo storage _pool,
        uint256 _amount,
        bool _compound
    ) private {
        if (_amount > 0) {
            /// If its compounding then we there is no need to transfer
            if (!_compound) {
                _pool.lpToken.safeTransferFrom(
                    address(msg.sender),
                    address(this),
                    _amount
                );
            }
            _user.amount = _user.amount.add(_amount);
            _user.rewardDebt =
                _user.rewardDebt +
                int256(_amount.mul(_pool.accJonesPerShare).div(1e12));
            _pool.currentDeposit += _amount;
        }
    }

    function _senderIsEligible() internal view {
        if (msg.sender != tx.origin) {
            if (!whitelistedContract[msg.sender]) {
                revert Contract_Not_Whitelisted();
            }
        }
    }

    /**
     * Calculates the peding rewards with the given paramethers.
     * If the reward debt is negative it adds as pending, if its positive it counts as already payed.
     * @param _rewardDebt current user reward debt (or allowance)
     * @param _accJonesPerShare accomulated jones per share
     * @param _amount amount to which it is being calculated to
     */
    function _calculatePending(
        int256 _rewardDebt,
        uint256 _accJonesPerShare,
        uint256 _amount
    ) internal pure returns (uint256) {
        return
            _rewardDebt < 0
                ? _amount.mul(_accJonesPerShare).div(1e12).add(
                    (-_rewardDebt).toUint256()
                )
                : _amount.mul(_accJonesPerShare).div(1e12).sub(
                    (_rewardDebt).toUint256()
                );
    }

    // ============================== Modifiers ==============================

    modifier nonDuplicated(IERC20 _lpToken) {
        if (poolExistence[_lpToken]) revert Pool_For_Token_Exists();
        _;
    }

    modifier onlyRewardsManager() {
        if (msg.sender != rewardManager) {
            revert Not_Permited();
        }
        _;
    }

    // ============================== Events ==============================

    error Single_Staking_Only(); // Single staking only
    error E2(); // Reward transaction failed (add more JONES to Milliner)
    error Pool_For_Token_Exists(); // Cannot have 2 pools for same token
    error Not_Enough_Balance(); // Not enough balance
    error Zero_Amount(); // 0 amount
    error Contract_Not_Whitelisted(); // Contract not whitelisted
    error Not_Permited(); // Not authorized
    error Farm_Start_In_The_Past(); // Farm cannot start in the past
    error Zero_Address(); // Zero address

    // ============================== Events ==============================

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event Harvest(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );
    event SetFeeAddress(address indexed user, address indexed newAddress);
    event SetDevAddress(address indexed user, address indexed newAddress);
    event UpdateEmissionRate(uint256 jonesPerSecond);
    event PoolUpdate(uint256 pid, uint256 newAlloc);
    event NewPool(address lp, uint256 pid, uint256 newAlloc);
}

File 2 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 3 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 4 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

File 6 of 10 : SafeCast.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128) {
        require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
        return int128(value);
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64) {
        require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
        return int64(value);
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32) {
        require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
        return int32(value);
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16) {
        require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
        return int16(value);
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8) {
        require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
        return int8(value);
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

File 7 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 8 of 10 : HatDistributionCenter.sol
// SPDX-License-Identifier: GPL-3.0
/*                            ******@@@@@@@@@**@*                               
                        ***@@@@@@@@@@@@@@@@@@@@@@**                             
                     *@@@@@@**@@@@@@@@@@@@@@@@@*@@@*                            
                  *@@@@@@@@@@@@@@@@@@@*@@@@@@@@@@@*@**                          
                 *@@@@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@*                         
                **@@@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@@@**                       
                **@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@@@@@@@*                      
                **@@@@@@@@@@@@@@@@*************************                    
                **@@@@@@@@***********************************                   
                 *@@@***********************&@@@@@@@@@@@@@@@****,    ******@@@@*
           *********************@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@************* 
      ***@@@@@@@@@@@@@@@*****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@*********      
   **@@@@@**********************@@@@*****************#@@@@**********            
  *@@******************************************************                     
 *@************************************                                         
 @*******************************                                               
 *@*************************                                                    
   ********************* 
   
    /$$$$$                                               /$$$$$$$   /$$$$$$   /$$$$$$ 
   |__  $$                                              | $$__  $$ /$$__  $$ /$$__  $$
      | $$  /$$$$$$  /$$$$$$$   /$$$$$$   /$$$$$$$      | $$  \ $$| $$  \ $$| $$  \ $$
      | $$ /$$__  $$| $$__  $$ /$$__  $$ /$$_____/      | $$  | $$| $$$$$$$$| $$  | $$
 /$$  | $$| $$  \ $$| $$  \ $$| $$$$$$$$|  $$$$$$       | $$  | $$| $$__  $$| $$  | $$
| $$  | $$| $$  | $$| $$  | $$| $$_____/ \____  $$      | $$  | $$| $$  | $$| $$  | $$
|  $$$$$$/|  $$$$$$/| $$  | $$|  $$$$$$$ /$$$$$$$/      | $$$$$$$/| $$  | $$|  $$$$$$/
 \______/  \______/ |__/  |__/ \_______/|_______/       |_______/ |__/  |__/ \______/                                      
*/

pragma solidity ^0.8.2;

// Libraries
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

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

/* Reponsible for the distribution of hats produced by the Milliner */
contract HatDistributionCenter is Ownable {
    using SafeERC20 for IERC20;

    address public milliner;
    IERC20 public rewardToken;

    constructor(address _rewardToken) {
        rewardToken = IERC20(_rewardToken);
    }

    // ============================== Milliner Functions ==============================

    function sendRewards(uint256 _amount, address _user) public onlyMilliner {
        rewardToken.safeTransfer(_user, _amount);
        emit Shipped(_user, _amount);
    }

    // ============================== Admin Functions ==============================

    function updateMilliner(address _milliner) public onlyOwner {
        milliner = _milliner;
    }

    function withdrawRewards(uint256 _amount, address _destination)
        public
        onlyOwner
    {
        rewardToken.safeTransfer(_destination, _amount);
    }

    // ============================== Modifiers ==============================

    modifier onlyMilliner() {
        if (msg.sender != milliner) {
            revert Only_Milliner();
        }
        _;
    }

    // ============================== Erors ==============================

    error Only_Milliner(); // Only milliner
    error Zero_Address(); // Zero address

    // ============================== Events ==============================

    event Shipped(address user, uint256 amount);
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_jones","type":"address"},{"internalType":"uint256","name":"_jonesPerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"address","name":"_rewardManager","type":"address"},{"internalType":"address","name":"_hatDistributor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Contract_Not_Whitelisted","type":"error"},{"inputs":[],"name":"E2","type":"error"},{"inputs":[],"name":"Farm_Start_In_The_Past","type":"error"},{"inputs":[],"name":"Not_Enough_Balance","type":"error"},{"inputs":[],"name":"Not_Permited","type":"error"},{"inputs":[],"name":"Pool_For_Token_Exists","type":"error"},{"inputs":[],"name":"Single_Staking_Only","type":"error"},{"inputs":[],"name":"Zero_Address","type":"error"},{"inputs":[],"name":"Zero_Amount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lp","type":"address"},{"indexed":false,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAlloc","type":"uint256"}],"name":"NewPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAlloc","type":"uint256"}],"name":"PoolUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetDevAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetFeeAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"jonesPerSecond","type":"uint256"}],"name":"UpdateEmissionRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"}],"name":"addContractAddressToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"deposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hatDistributor","outputs":[{"internalType":"contract HatDistributionCenter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"jones","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"jonesPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"migrateRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingJones","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardSecond","type":"uint256"},{"internalType":"uint256","name":"accJonesPerShare","type":"uint256"},{"internalType":"uint256","name":"currentDeposit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"}],"name":"removeContractAddressFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_jonesPerSecond","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_distributor","type":"address"}],"name":"updateHatDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newManager","type":"address"}],"name":"updateRewardsManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"int256","name":"rewardDebt","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260006006553480156200001657600080fd5b50604051620038783803806200387883398181016040528101906200003c91906200035d565b6200005c62000050620001a760201b60201c565b620001af60201b60201c565b60018081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620000cb576040517fa7942db800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550836003819055508260078190555081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050620003e5565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002a58262000278565b9050919050565b6000620002b98262000298565b9050919050565b620002cb81620002ac565b8114620002d757600080fd5b50565b600081519050620002eb81620002c0565b92915050565b6000819050919050565b6200030681620002f1565b81146200031257600080fd5b50565b6000815190506200032681620002fb565b92915050565b620003378162000298565b81146200034357600080fd5b50565b60008151905062000357816200032c565b92915050565b600080600080600060a086880312156200037c576200037b62000273565b5b60006200038c88828901620002da565b95505060206200039f8882890162000315565b9450506040620003b28882890162000315565b9350506060620003c58882890162000346565b9250506080620003d88882890162000346565b9150509295509295909350565b61348380620003f56000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c806378e979251161010f578063aa5f7e26116100a2578063e2bbb15811610071578063e2bbb15814610545578063e8b025e014610561578063ed11bfb21461057d578063f2fde38b1461059b576101e5565b8063aa5f7e26146104bf578063b763b09c146104db578063cbd258b5146104f9578063ddc6326214610529576101e5565b806393f1a40b116100de57806393f1a40b14610426578063a238310614610457578063a3ffa52314610487578063a6c008ee146104a3576101e5565b806378e979251461039e5780637efed646146103bc57806388554674146103ec5780638da5cb5b14610408576101e5565b806328836fd711610187578063628f3b5911610156578063628f3b5914610352578063630b5ba11461036e57806364482f7914610378578063715018a614610394576101e5565b806328836fd7146102ce578063441a3e70146102fe57806351eb05a61461031a5780635312ea8e14610336576101e5565b80631526fe27116101c35780631526fe271461024257806315b21c181461027657806317caf6f1146102945780631eaaa045146102b2576101e5565b8063081e3eda146101ea5780630ba84cd2146102085780630f4ef8a614610224575b600080fd5b6101f26105b7565b6040516101ff9190612649565b60405180910390f35b610222600480360381019061021d9190612695565b6105c4565b005b61022c610691565b6040516102399190612703565b60405180910390f35b61025c60048036038101906102579190612695565b6106b7565b60405161026d95949392919061277d565b60405180910390f35b61027e61071d565b60405161028b9190612649565b60405180910390f35b61029c610723565b6040516102a99190612649565b60405180910390f35b6102cc60048036038101906102c79190612846565b610729565b005b6102e860048036038101906102e391906128c5565b6109f1565b6040516102f59190612901565b60405180910390f35b6103186004803603810190610313919061291c565b610a11565b005b610334600480360381019061032f9190612695565b610c85565b005b610350600480360381019061034b9190612695565b610d88565b005b61036c600480360381019061036791906128c5565b610f22565b005b610376610fe2565b005b610392600480360381019061038d919061295c565b611015565b005b61039c611165565b005b6103a66111ed565b6040516103b39190612649565b60405180910390f35b6103d660048036038101906103d191906129af565b6111f3565b6040516103e39190612649565b60405180910390f35b610406600480360381019061040191906128c5565b61134e565b005b610410611475565b60405161041d9190612703565b60405180910390f35b610440600480360381019061043b91906129af565b61149e565b60405161044e929190612a08565b60405180910390f35b610471600480360381019061046c91906129af565b6114cf565b60405161047e9190612649565b60405180910390f35b6104a1600480360381019061049c91906129af565b61152d565b005b6104bd60048036038101906104b891906128c5565b6115fa565b005b6104d960048036038101906104d49190612695565b6116d1565b005b6104e36118cd565b6040516104f09190612a31565b60405180910390f35b610513600480360381019061050e9190612a4c565b6118f3565b6040516105209190612901565b60405180910390f35b610543600480360381019061053e9190612695565b611913565b005b61055f600480360381019061055a919061291c565b611a5c565b005b61057b600480360381019061057691906128c5565b611bd9565b005b610585611cb0565b6040516105929190612a9a565b60405180910390f35b6105b560048036038101906105b091906128c5565b611cd6565b005b6000600480549050905090565b6105cc611dce565b73ffffffffffffffffffffffffffffffffffffffff166105ea611475565b73ffffffffffffffffffffffffffffffffffffffff1614610640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063790612b12565b60405180910390fd5b610648610fe2565b80600381905550610657610fe2565b7f232bc60e54c3a684fb69d1cde365a10c51105f4f8ba47a6cd0c5435192010a9c816040516106869190612649565b60405180910390a150565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600481815481106106c757600080fd5b90600052602060002090600502016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154908060040154905085565b60035481565b60065481565b610731611dce565b73ffffffffffffffffffffffffffffffffffffffff1661074f611475565b73ffffffffffffffffffffffffffffffffffffffff16146107a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079c90612b12565b60405180910390fd5b81600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561082a576040517f6f24dc1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b811561083957610838610fe2565b5b6000600754421161084c5760075461084e565b425b905061086585600654611dd690919063ffffffff16565b6006819055506001600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060046040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff168152602001878152602001838152602001600081526020016000815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015550507f92577575cebe2a09c6c7f693fa717c49e096a11453be4e224d7920b86c7260798460016004805490506109d29190612b61565b876040516109e293929190612b95565b60405180910390a15050505050565b60096020528060005260406000206000915054906101000a900460ff1681565b60026001541415610a57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4e90612c18565b60405180910390fd5b6002600181905550600060048381548110610a7557610a74612c38565b5b9060005260206000209060050201905060006005600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508281600001541015610b17576040517fe045f48300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000831415610b52576040517fcf2458d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5b84610c85565b610baa33848460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611dec9092919063ffffffff16565b610bd864e8d4a51000610bca846003015486611e7290919063ffffffff16565b611e8890919063ffffffff16565b8160010154610be79190612c67565b8160010181905550610c06838260000154611e9e90919063ffffffff16565b816000018190555082826004016000828254610c229190612b61565b92505081905550833373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56885604051610c709190612649565b60405180910390a35050600180819055505050565b600060048281548110610c9b57610c9a612c38565b5b906000526020600020906005020190508060020154421115610d8457600081600401549050600081118015610cd4575060008260010154115b15610d79576000610ce9836002015442611eb4565b90506000610d2c600654610d1e8660010154610d1060035487611e7290919063ffffffff16565b611e7290919063ffffffff16565b611e8890919063ffffffff16565b9050610d6e610d5b84610d4d64e8d4a5100085611e7290919063ffffffff16565b611e8890919063ffffffff16565b8560030154611dd690919063ffffffff16565b846003018190555050505b428260020181905550505b5050565b60026001541415610dce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc590612c18565b60405180910390fd5b6002600181905550600060048281548110610dec57610deb612c38565b5b9060005260206000209060050201905060006005600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816000015490506000826000018190555060008260010181905550610ebc33828560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611dec9092919063ffffffff16565b60008360040181905550833373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059583604051610f0d9190612649565b60405180910390a35050506001808190555050565b610f2a611dce565b73ffffffffffffffffffffffffffffffffffffffff16610f48611475565b73ffffffffffffffffffffffffffffffffffffffff1614610f9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9590612b12565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600480549050905060005b818110156110115761100081610c85565b8061100a90612cfb565b9050610fef565b5050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109c576040517f22893b2100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156110ab576110aa610fe2565b5b6110f7826110e9600486815481106110c6576110c5612c38565b5b906000526020600020906005020160010154600654611e9e90919063ffffffff16565b611dd690919063ffffffff16565b600681905550816004848154811061111257611111612c38565b5b9060005260206000209060050201600101819055507f7a82ddc04b2a4dbbd6f9eb8a0eba412839065badf78dde2949d1b781b7ffe6688383604051611158929190612d44565b60405180910390a1505050565b61116d611dce565b73ffffffffffffffffffffffffffffffffffffffff1661118b611475565b73ffffffffffffffffffffffffffffffffffffffff16146111e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d890612b12565b60405180910390fd5b6111eb6000611ed1565b565b60075481565b6000806004848154811061120a57611209612c38565b5b9060005260206000209060050201905060006005600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600082600301549050600083600401549050836002015442118015611294575060008114155b1561132f5760006112a9856002015442611eb4565b905060006112ec6006546112de88600101546112d060035487611e7290919063ffffffff16565b611e7290919063ffffffff16565b611e8890919063ffffffff16565b905061132a61131b8461130d64e8d4a5100085611e7290919063ffffffff16565b611e8890919063ffffffff16565b85611dd690919063ffffffff16565b935050505b6113428360010154838560000154611f95565b94505050505092915050565b611356611dce565b73ffffffffffffffffffffffffffffffffffffffff16611374611475565b73ffffffffffffffffffffffffffffffffffffffff16146113ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c190612b12565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611431576040517fa7942db800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6005602052816000526040600020602052806000526040600020600091509150508060000154908060010154905082565b60006005600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905092915050565b611535611dce565b73ffffffffffffffffffffffffffffffffffffffff16611553611475565b73ffffffffffffffffffffffffffffffffffffffff16146115a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a090612b12565b60405180910390fd5b6115f68183600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611dec9092919063ffffffff16565b5050565b611602611dce565b73ffffffffffffffffffffffffffffffffffffffff16611620611475565b73ffffffffffffffffffffffffffffffffffffffff1614611676576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166d90612b12565b60405180910390fd5b6001600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60026001541415611717576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170e90612c18565b60405180910390fd5b600260018190555060006004828154811061173557611734612c38565b5b9060005260206000209060050201905060006005600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611844576040517f9da02bf700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61184d83610c85565b6000611866826001015484600301548460000154611f95565b90506000811461187e5761187d828483600161203e565b5b6118b86118b364e8d4a510006118a586600301548660000154611e7290919063ffffffff16565b611e8890919063ffffffff16565b612124565b82600101819055505050506001808190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60086020528060005260406000206000915054906101000a900460ff1681565b60006004828154811061192957611928612c38565b5b9060005260206000209060050201905060006005600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905061199683610c85565b60006119af826001015484600301548460000154611f95565b905060008111156119c5576119c43382612191565b5b6119ff6119fa64e8d4a510006119ec86600301548660000154611e7290919063ffffffff16565b611e8890919063ffffffff16565b612124565b8260010181905550833373ffffffffffffffffffffffffffffffffffffffff167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae066092495483604051611a4e9190612649565b60405180910390a350505050565b60026001541415611aa2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9990612c18565b60405180910390fd5b6002600181905550611ab2612224565b600060048381548110611ac857611ac7612c38565b5b9060005260206000209060050201905060006005600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000831415611b67576040517fcf2458d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b7084610c85565b611b7d818385600061203e565b833373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1585604051611bc49190612649565b60405180910390a35050600180819055505050565b611be1611dce565b73ffffffffffffffffffffffffffffffffffffffff16611bff611475565b73ffffffffffffffffffffffffffffffffffffffff1614611c55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4c90612b12565b60405180910390fd5b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611cde611dce565b73ffffffffffffffffffffffffffffffffffffffff16611cfc611475565b73ffffffffffffffffffffffffffffffffffffffff1614611d52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4990612b12565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611dc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db990612ddf565b60405180910390fd5b611dcb81611ed1565b50565b600033905090565b60008183611de49190612dff565b905092915050565b611e6d8363a9059cbb60e01b8484604051602401611e0b929190612e55565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506122dd565b505050565b60008183611e809190612e7e565b905092915050565b60008183611e969190612f07565b905092915050565b60008183611eac9190612b61565b905092915050565b6000611ec98383611e9e90919063ffffffff16565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808412611fe757611fe2611faa856123a4565b611fd464e8d4a51000611fc68787611e7290919063ffffffff16565b611e8890919063ffffffff16565b611e9e90919063ffffffff16565b612035565b612034611ffc85611ff790612f38565b6123a4565b61202664e8d4a510006120188787611e7290919063ffffffff16565b611e8890919063ffffffff16565b611dd690919063ffffffff16565b5b90509392505050565b600082111561211e578061209e5761209d3330848660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f1909392919063ffffffff16565b5b6120b5828560000154611dd690919063ffffffff16565b84600001819055506120eb64e8d4a510006120dd856003015485611e7290919063ffffffff16565b611e8890919063ffffffff16565b84600101546120fa9190612f81565b8460010181905550818360040160008282546121169190612dff565b925050819055505b50505050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821115612189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218090613087565b60405180910390fd5b819050919050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d1168db682846040518363ffffffff1660e01b81526004016121ee9291906130a7565b600060405180830381600087803b15801561220857600080fd5b505af115801561221c573d6000803e3d6000fd5b505050505050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146122db57600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166122da576040517f51c5ebac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b565b600061233f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661247a9092919063ffffffff16565b905060008151111561239f578080602001905181019061235f91906130e5565b61239e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239590613184565b60405180910390fd5b5b505050565b6000808212156123e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123e0906131f0565b60405180910390fd5b819050919050565b612474846323b872dd60e01b85858560405160240161241293929190613210565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506122dd565b50505050565b60606124898484600085612492565b90509392505050565b6060824710156124d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ce906132b9565b60405180910390fd5b6124e0856125a6565b61251f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161251690613325565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161254891906133bf565b60006040518083038185875af1925050503d8060008114612585576040519150601f19603f3d011682016040523d82523d6000602084013e61258a565b606091505b509150915061259a8282866125c9565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156125d957829050612629565b6000835111156125ec5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612620919061342b565b60405180910390fd5b9392505050565b6000819050919050565b61264381612630565b82525050565b600060208201905061265e600083018461263a565b92915050565b600080fd5b61267281612630565b811461267d57600080fd5b50565b60008135905061268f81612669565b92915050565b6000602082840312156126ab576126aa612664565b5b60006126b984828501612680565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126ed826126c2565b9050919050565b6126fd816126e2565b82525050565b600060208201905061271860008301846126f4565b92915050565b6000819050919050565b600061274361273e612739846126c2565b61271e565b6126c2565b9050919050565b600061275582612728565b9050919050565b60006127678261274a565b9050919050565b6127778161275c565b82525050565b600060a082019050612792600083018861276e565b61279f602083018761263a565b6127ac604083018661263a565b6127b9606083018561263a565b6127c6608083018461263a565b9695505050505050565b60006127db826126e2565b9050919050565b6127eb816127d0565b81146127f657600080fd5b50565b600081359050612808816127e2565b92915050565b60008115159050919050565b6128238161280e565b811461282e57600080fd5b50565b6000813590506128408161281a565b92915050565b60008060006060848603121561285f5761285e612664565b5b600061286d86828701612680565b935050602061287e868287016127f9565b925050604061288f86828701612831565b9150509250925092565b6128a2816126e2565b81146128ad57600080fd5b50565b6000813590506128bf81612899565b92915050565b6000602082840312156128db576128da612664565b5b60006128e9848285016128b0565b91505092915050565b6128fb8161280e565b82525050565b600060208201905061291660008301846128f2565b92915050565b6000806040838503121561293357612932612664565b5b600061294185828601612680565b925050602061295285828601612680565b9150509250929050565b60008060006060848603121561297557612974612664565b5b600061298386828701612680565b935050602061299486828701612680565b92505060406129a586828701612831565b9150509250925092565b600080604083850312156129c6576129c5612664565b5b60006129d485828601612680565b92505060206129e5858286016128b0565b9150509250929050565b6000819050919050565b612a02816129ef565b82525050565b6000604082019050612a1d600083018561263a565b612a2a60208301846129f9565b9392505050565b6000602082019050612a46600083018461276e565b92915050565b600060208284031215612a6257612a61612664565b5b6000612a70848285016127f9565b91505092915050565b6000612a848261274a565b9050919050565b612a9481612a79565b82525050565b6000602082019050612aaf6000830184612a8b565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612afc602083612ab5565b9150612b0782612ac6565b602082019050919050565b60006020820190508181036000830152612b2b81612aef565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612b6c82612630565b9150612b7783612630565b925082821015612b8a57612b89612b32565b5b828203905092915050565b6000606082019050612baa60008301866126f4565b612bb7602083018561263a565b612bc4604083018461263a565b949350505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000612c02601f83612ab5565b9150612c0d82612bcc565b602082019050919050565b60006020820190508181036000830152612c3181612bf5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612c72826129ef565b9150612c7d836129ef565b9250827f800000000000000000000000000000000000000000000000000000000000000001821260008412151615612cb857612cb7612b32565b5b827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018213600084121615612cf057612cef612b32565b5b828203905092915050565b6000612d0682612630565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612d3957612d38612b32565b5b600182019050919050565b6000604082019050612d59600083018561263a565b612d66602083018461263a565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612dc9602683612ab5565b9150612dd482612d6d565b604082019050919050565b60006020820190508181036000830152612df881612dbc565b9050919050565b6000612e0a82612630565b9150612e1583612630565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612e4a57612e49612b32565b5b828201905092915050565b6000604082019050612e6a60008301856126f4565b612e77602083018461263a565b9392505050565b6000612e8982612630565b9150612e9483612630565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612ecd57612ecc612b32565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612f1282612630565b9150612f1d83612630565b925082612f2d57612f2c612ed8565b5b828204905092915050565b6000612f43826129ef565b91507f8000000000000000000000000000000000000000000000000000000000000000821415612f7657612f75612b32565b5b816000039050919050565b6000612f8c826129ef565b9150612f97836129ef565b9250817f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03831360008312151615612fd257612fd1612b32565b5b817f800000000000000000000000000000000000000000000000000000000000000003831260008312161561300a57613009612b32565b5b828201905092915050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e206160008201527f6e20696e74323536000000000000000000000000000000000000000000000000602082015250565b6000613071602883612ab5565b915061307c82613015565b604082019050919050565b600060208201905081810360008301526130a081613064565b9050919050565b60006040820190506130bc600083018561263a565b6130c960208301846126f4565b9392505050565b6000815190506130df8161281a565b92915050565b6000602082840312156130fb576130fa612664565b5b6000613109848285016130d0565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061316e602a83612ab5565b915061317982613112565b604082019050919050565b6000602082019050818103600083015261319d81613161565b9050919050565b7f53616665436173743a2076616c7565206d75737420626520706f736974697665600082015250565b60006131da602083612ab5565b91506131e5826131a4565b602082019050919050565b60006020820190508181036000830152613209816131cd565b9050919050565b600060608201905061322560008301866126f4565b61323260208301856126f4565b61323f604083018461263a565b949350505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006132a3602683612ab5565b91506132ae82613247565b604082019050919050565b600060208201905081810360008301526132d281613296565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b600061330f601d83612ab5565b915061331a826132d9565b602082019050919050565b6000602082019050818103600083015261333e81613302565b9050919050565b600081519050919050565b600081905092915050565b60005b8381101561337957808201518184015260208101905061335e565b83811115613388576000848401525b50505050565b600061339982613345565b6133a38185613350565b93506133b381856020860161335b565b80840191505092915050565b60006133cb828461338e565b915081905092915050565b600081519050919050565b6000601f19601f8301169050919050565b60006133fd826133d6565b6134078185612ab5565b935061341781856020860161335b565b613420816133e1565b840191505092915050565b6000602082019050818103600083015261344581846133f2565b90509291505056fea2646970667358221220d53f72e6cd1898ddf6ff44c301207c7890c2e0d67a9f08446e7f0e5327a1b3d464736f6c634300080a003300000000000000000000000010393c20975cf177a3513071bc110f7962cd67da00000000000000000000000000000000000000000000000000980e5f8c63000000000000000000000000000000000000000000000000000000000000627514c80000000000000000000000004817ca4df701d554d78aa3d142b62c162c682ee1000000000000000000000000808a84063a586e680b7699be20a4ec958adfdf86

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

00000000000000000000000010393c20975cf177a3513071bc110f7962cd67da00000000000000000000000000000000000000000000000000980e5f8c63000000000000000000000000000000000000000000000000000000000000627514c80000000000000000000000004817ca4df701d554d78aa3d142b62c162c682ee1000000000000000000000000808a84063a586e680b7699be20a4ec958adfdf86

-----Decoded View---------------
Arg [0] : _jones (address): 0x10393c20975cf177a3513071bc110f7962cd67da
Arg [1] : _jonesPerSecond (uint256): 42800000000000000
Arg [2] : _startTime (uint256): 1651840200
Arg [3] : _rewardManager (address): 0x4817ca4df701d554d78aa3d142b62c162c682ee1
Arg [4] : _hatDistributor (address): 0x808a84063a586e680b7699be20a4ec958adfdf86

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000010393c20975cf177a3513071bc110f7962cd67da
Arg [1] : 00000000000000000000000000000000000000000000000000980e5f8c630000
Arg [2] : 00000000000000000000000000000000000000000000000000000000627514c8
Arg [3] : 0000000000000000000000004817ca4df701d554d78aa3d142b62c162c682ee1
Arg [4] : 000000000000000000000000808a84063a586e680b7699be20a4ec958adfdf86


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