Contract 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 1

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29Do Hard Work279522212022-10-02 9:34:213 days 22 hrs ago0x2325079108ce42689af06157854f2f48cb268aba IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00143384
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670fDeposit277066442022-10-01 4:35:005 days 3 hrs ago0xcdb86d278b021e4c8fd88b9e86b462b9f33ef028 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00165661
0x0f071bba30a213f0c8776d9f36104dacd361f9c9a814b9b98e90e7e1e768ce75Withdraw277017832022-10-01 3:52:145 days 4 hrs ago0xcdb86d278b021e4c8fd88b9e86b462b9f33ef028 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00173927
0x364ed4693400565cefca792b5e07c6aa06e8bc037fcfa1a58d0f042b3e03084dWithdraw All274801222022-09-29 20:33:516 days 11 hrs ago0x76be94247029f034beee1bd4192f6eedc7285ff8 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00200386
0x1ad280fc3d8bd83a98c737a24debc1f3d763e44936dc4a49326a835b6d5a7349Do Hard Work274800422022-09-29 20:32:576 days 11 hrs ago0x76be94247029f034beee1bd4192f6eedc7285ff8 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00185656
0xeb03b0821c065543f01b33cc8f7721595df49f1d906f3139a19ec93478a85aa2Deposit272824252022-09-28 20:11:117 days 12 hrs ago0xcdb86d278b021e4c8fd88b9e86b462b9f33ef028 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.0022108
0x94d869f91a03141e8c85a0a527ba14fa429b78b42667aea347881fb4ab5f013eWithdraw272525572022-09-28 16:03:247 days 16 hrs ago0xcdb86d278b021e4c8fd88b9e86b462b9f33ef028 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00201308
0xd961a18e09b4d75ac73f346e361fdd087f61ebe29f4b270a1ace7ff62444be5bDo Hard Work271276572022-09-28 5:18:188 days 2 hrs ago0x2325079108ce42689af06157854f2f48cb268aba IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00156199
0x0b397cdafc453350c2dca75517172880de25586d12014292a8ea762657ab6631Do Hard Work261302172022-09-23 8:01:1913 days 16 mins ago0x76be94247029f034beee1bd4192f6eedc7285ff8 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00141876
0x87ece2bcc71712810d8dc8cd706d64618854a148f28d3e2c4e6a764e70b40f6cDo Hard Work260003792022-09-22 16:09:4913 days 16 hrs ago0x76be94247029f034beee1bd4192f6eedc7285ff8 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00299735
0xbe0d3404cfc361aa4c8bd2b7c8bad759fb0ce713ada90569eb0a84369d7bcf0dDo Hard Work255026812022-09-20 14:41:0015 days 17 hrs ago0x76be94247029f034beee1bd4192f6eedc7285ff8 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00185231
0x277d5caae66721b0b6ae2225b2b2155977cfbe975eab26a098b93fd321176769Do Hard Work252843512022-09-19 13:26:2616 days 18 hrs ago0x76be94247029f034beee1bd4192f6eedc7285ff8 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00142423
0x6e872d72869e437a6e857b8c3da3e00501ea416703e566fcf29fb768e26c06cdWithdraw241926702022-09-12 6:13:0824 days 2 hrs ago0x98771321ad898ed7e2a367fc860aaf398e070807 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00162686
0xb09249907283cd7b80b76a783c3f6ab754d27da03f2a81cd96a41c7bd7604d38Do Hard Work234547502022-09-07 21:47:3028 days 10 hrs ago0x98771321ad898ed7e2a367fc860aaf398e070807 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00203837
0x458d1fb32a39a0ffc138bbf8d5ac7c4cf428a9fd6bf88dcad8f3c5611a7c1671Do Hard Work229983472022-09-05 17:13:4130 days 15 hrs ago0x2325079108ce42689af06157854f2f48cb268aba IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00188626
0x1bf75ea5045e53a5ae84d90d7135d0bb8ac80e8a6f5116db04f182616d67f741Do Hard Work229981462022-09-05 17:12:0830 days 15 hrs ago0x2325079108ce42689af06157854f2f48cb268aba IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00193072
0xe153f20f00466ac862f71bc5cb920cc6e0f48e1eee7f8a21785348c265e4bdc4Deposit225498522022-09-02 20:45:2233 days 11 hrs ago0x2325079108ce42689af06157854f2f48cb268aba IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.0020714
0x7b5320fb8c4d408886527b276ad0eabdcf2f61755dfeb12d1364a63ce7d7b3ebDo Hard Work225496502022-09-02 20:42:4933 days 11 hrs ago0x2325079108ce42689af06157854f2f48cb268aba IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00183163
0xc3de1a44a140abd5b4ecf8d39d69a105fbe3057b7b597b49d968f91f9f2e99ecDo Hard Work218654592022-08-29 14:59:4637 days 17 hrs ago0x5cbd0b14c1ee0a389091d6a419dd60c1efc83f7d IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00019754584 ETH
0xd0af8f26e2a4955810c9914669fd3f49ba3a03d9eb6b9b7bf42535b8ee5f1642Withdraw212094572022-08-25 3:50:3742 days 4 hrs ago0x473bbc06d7fdb7713d1ed334f8d8096cad6ec3f3 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.000090636844 ETH
0x091b2bbb910a2ef21822e2ef812ca5f90a7b219d988c2773ed6e10bc248266e5Withdraw210758922022-08-23 16:46:1643 days 15 hrs ago0x5cbd0b14c1ee0a389091d6a419dd60c1efc83f7d IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.000084633464 ETH
0xcee18117de0c8eab5a8f6787d14fed6c04bc973f7d22b93b2bcdde8ade8475cfDo Hard Work210743132022-08-23 16:25:4243 days 15 hrs ago0x5cbd0b14c1ee0a389091d6a419dd60c1efc83f7d IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.000074278374 ETH
0x97690b5d018cc15ee149837697d343ccf8f8e9765a0a04a3cb31ecd0ead63e92Withdraw203308302022-08-15 16:41:1751 days 15 hrs ago0x473bbc06d7fdb7713d1ed334f8d8096cad6ec3f3 IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.000118910044 ETH
0x0c1877b145698afd8f0568963ac80cbf59a0e004ffac1f15a08e034ce5188edbWithdraw203165042022-08-15 13:22:3751 days 18 hrs ago0xe5fd5ec4695b93d7e43f5d96657a535e0ff499bd IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.000097877265 ETH
0x6bd0252934a082c57f12ea66279e6d0a00fe48ccf59811b682688bb765768fc8Withdraw199845252022-08-11 7:45:1156 days 32 mins ago0xd827531e21ad020f2e024e5d456f4ad4de9e591a IN  0x689287e4ff1dfb87da7ae3936083eb67787ba0b00 ETH0.00015335306 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 0xf4d73326c13a4fc5fd7a064217e12780e9bd62c30 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xb7e50106a5bd3cf21af210a755f9c8740890a8c90 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xb7e50106a5bd3cf21af210a755f9c8740890a8c90 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 SushiSwap: Router0.035668239294839393 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago SushiSwap: Router 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00.035668239294839393 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 SushiSwap: Router0 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0Treasure DAO: Magic Token0 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 SushiSwap: Router0 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xd4d42f0b6def4ce0383636770ef773390d85c61a0 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 0xf4d73326c13a4fc5fd7a064217e12780e9bd62c30 ETH
0x1a460541965d1da1de8421013d6b3f401e44eeb473df59f58823d758e3c02f29279522212022-10-02 9:34:213 days 22 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xb7e50106a5bd3cf21af210a755f9c8740890a8c90 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 0xf4d73326c13a4fc5fd7a064217e12780e9bd62c30 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xb7e50106a5bd3cf21af210a755f9c8740890a8c90 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 0xf4d73326c13a4fc5fd7a064217e12780e9bd62c30 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 0xf4d73326c13a4fc5fd7a064217e12780e9bd62c30 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xb7e50106a5bd3cf21af210a755f9c8740890a8c90 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xb7e50106a5bd3cf21af210a755f9c8740890a8c90 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 SushiSwap: Router0.000953690810946404 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago SushiSwap: Router 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00.000953690810946404 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 SushiSwap: Router0 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0Treasure DAO: Magic Token0 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 SushiSwap: Router0 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xd4d42f0b6def4ce0383636770ef773390d85c61a0 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b0 0xf4d73326c13a4fc5fd7a064217e12780e9bd62c30 ETH
0x427ce289da43cf5f2d1751b682d3e108a431e67aa6dc9cd86c814b3e63db670f277066442022-10-01 4:35:005 days 3 hrs ago 0x689287e4ff1dfb87da7ae3936083eb67787ba0b00xb7e50106a5bd3cf21af210a755f9c8740890a8c90 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MagicVault

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : MagicVault.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

/*
#     #    #     #####  ###  #####
##   ##   # #   #     #  #  #     #
# # # #  #   #  #        #  #
#  #  # #     # #  ####  #  #
#     # ####### #     #  #  #
#     # #     # #     #  #  #     #
#     # #     #  #####  ###  #####

#     #    #    #     # #       #######
#     #   # #   #     # #          #
#     #  #   #  #     # #          #
#     # #     # #     # #          #
 #   #  ####### #     # #          #
  # #   #     # #     # #          #
   #    #     #  #####  #######    #
*/

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

interface IMiniChefV2 {
    function harvest(uint256 pid, address to) external;

    function deposit(uint256 pid, uint256 amount, address to) external;

    function withdraw(uint256 pid, uint256 amount, address to) external;

    function userInfo(uint256, address) external view returns (uint256, uint256);
}

interface ISushiSwapRouter {
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;

    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);

    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

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

interface IREWARDER {
    function pendingToken(uint256 pid, address user) external view returns (uint256 pendingTokens);
}

interface ILPToken is IERC20 {
    function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast);
}

/*
    This vault was created for the community by the community.
    Find more about it in https://treasure.lol and https://thecollectorsnft.xyz/magic-vault
*/
contract MagicVault is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using SafeERC20 for ILPToken;

    IMiniChefV2 public constant MINICHEFV2 = IMiniChefV2(0xF4d73326C13a4Fc5FD7A064217e12780e9Bd62c3);
    ISushiSwapRouter public constant SUSHI_ROUTER = ISushiSwapRouter(0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506);
    IERC20 public constant SUSHI = IERC20(0xd4d42F0b6DEF4CE0383636770eF773390d85c61A);
    IERC20 public constant MAGIC = IERC20(0x539bdE0d7Dbd336b79148AA742883198BBF60342);
    ILPToken public constant LP_TOKEN = ILPToken(0xB7E50106A5bd3Cf21AF210A755F9C8740890A8c9);
    IREWARDER public constant REWARDER = IREWARDER(0x1a9c20e2b0aC11EBECbDCA626BBA566c4ce8e606);
    uint256 public constant POOL_ID = 13; // Magic pool

    address[] public sushiToMagicPath;
    address[] public magicToEthPath;
    uint256 public accPerShare;
    uint256 public totalShares;
    mapping(address => uint256) public userShares;
    uint256 public devFee;
    uint256 public lastTimePoolWasAutoCompounded;

    event Deposit(address indexed user, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);
    event WithdrawAll(address indexed user, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 amount);

    constructor () {
        sushiToMagicPath = [0xd4d42F0b6DEF4CE0383636770eF773390d85c61A, 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8, 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0x539bdE0d7Dbd336b79148AA742883198BBF60342];
        magicToEthPath = [0x539bdE0d7Dbd336b79148AA742883198BBF60342, 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1];
        SUSHI.approve(address(SUSHI_ROUTER), type(uint256).max);
        MAGIC.approve(address(SUSHI_ROUTER), type(uint256).max);
        LP_TOKEN.approve(address(MINICHEFV2), type(uint256).max);
        devFee = 100;
    }

    function setSushiToMagicPath(address[] memory _sushiToMagicPath) external onlyOwner {
        sushiToMagicPath = _sushiToMagicPath;
    }

    function setDevFee(uint256 _devFee) external onlyOwner {
        require(devFee <= 100, "not cool");
        devFee = _devFee;
    }

    function setMagicToEthPath(address[] memory _magicToEthPath) external onlyOwner {
        magicToEthPath = _magicToEthPath;
    }

    function doHardWork() nonReentrant public {
        updatePool();
    }

    function balance() public view returns (uint256 _totalLPTokens) {
        (_totalLPTokens,) = MINICHEFV2.userInfo(POOL_ID, address(this));
    }

    function balanceOf(address _user) view public returns (uint256 userBalance) {
        if (totalShares != 0) {
            uint256 pool = balance();
            userBalance = (pool * userShares[_user]) / totalShares;
        } else {
            userBalance = 0;
        }
    }

    function withdrawAll() nonReentrant public {
        require(userShares[msg.sender] > 0, "shares 0");
        updatePool();
        uint256 amount = balanceOf(msg.sender);
        totalShares -= userShares[msg.sender];
        userShares[msg.sender] = 0;
        // We can use msg.sender because we called updatePool just one sec ago so no magic and sushi rewards
        MINICHEFV2.withdraw(POOL_ID, amount, msg.sender);
        emit WithdrawAll(msg.sender, amount);
    }

    function withdraw(uint256 _amount) nonReentrant public {
        require(_amount > 0, "amount 0");
        updatePool();
        uint256 pool = balance();
        uint256 sharesToWithdraw = (_amount * totalShares) / pool;
        require(userShares[msg.sender] >= sharesToWithdraw, "Not enough");
        userShares[msg.sender] -= sharesToWithdraw;
        totalShares -= sharesToWithdraw;
        // We can use msg.sender because we called updatePool just one sec ago so no magic and sushi rewards
        MINICHEFV2.withdraw(POOL_ID, _amount, msg.sender);
        emit Withdraw(msg.sender, _amount);
    }

    function emergencyWithdraw() nonReentrant public {
        require(userShares[msg.sender] > 0, "shares 0");
        uint256 amount = balanceOf(msg.sender);
        totalShares -= userShares[msg.sender];
        userShares[msg.sender] = 0;
        MINICHEFV2.withdraw(POOL_ID, amount, address(this));
        LP_TOKEN.safeTransfer(msg.sender, amount);
        emit EmergencyWithdraw(msg.sender, amount);
    }

    function deposit(uint256 _amount) nonReentrant public {
        require(_amount > 0, "Nothing to deposit");
        updatePool();
        uint256 pool = balance();
        LP_TOKEN.safeTransferFrom(msg.sender, address(this), _amount);
        MINICHEFV2.deposit(POOL_ID, _amount, address(this));
        uint256 currentShares = 0;
        if (totalShares != 0) {
            currentShares = (_amount * totalShares) / pool;
        } else {
            currentShares = _amount;
        }
        userShares[msg.sender] += currentShares;
        totalShares += currentShares;
        emit Deposit(msg.sender, _amount);
    }

    function updatePool() internal {
        if (block.timestamp > lastTimePoolWasAutoCompounded) {
            uint256 prevLPBalance = LP_TOKEN.balanceOf(address(this));
            MINICHEFV2.harvest(POOL_ID, address(this));
            uint256 sushiBalance = SUSHI.balanceOf(address(this));
            if (sushiBalance > 0.0001 ether) {
                SUSHI_ROUTER.swapExactTokensForTokens(
                    sushiBalance,
                    1,
                    sushiToMagicPath,
                    address(this),
                    block.timestamp
                );
            }
            uint256 halfMagicBalance = MAGIC.balanceOf(address(this)) / 2;
            if (halfMagicBalance > 0.0001 ether && totalShares > 0) {
                SUSHI_ROUTER.swapExactTokensForETH(
                    halfMagicBalance,
                    1,
                    magicToEthPath,
                    address(this),
                    block.timestamp
                );
                SUSHI_ROUTER.addLiquidityETH{value : address(this).balance}(
                    address(MAGIC),
                    halfMagicBalance,
                    1,
                    1,
                    address(this),
                    block.timestamp
                );
                uint256 addedLPs = LP_TOKEN.balanceOf(address(this)) - prevLPBalance;
                uint256 devAmount = (addedLPs * devFee) / 1000;
                LP_TOKEN.safeTransfer(owner(), devAmount);
                addedLPs -= devAmount;
                MINICHEFV2.deposit(POOL_ID, addedLPs, address(this));
                lastTimePoolWasAutoCompounded = block.timestamp;
            }
        }
    }

    function salvageTokens(address asset) public onlyOwner {
        uint256 _balance = IERC20(asset).balanceOf(address(this));
        if (_balance > 0) {
            IERC20(asset).safeTransfer(owner(), _balance);
        }
    }

    function salvageETH() public onlyOwner {
        uint256 _balance = address(this).balance;
        if (_balance > 0) {
            Address.sendValue(payable(owner()), _balance);
        }
    }

    receive() external payable {}
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 3 of 7 : SafeERC20.sol
// SPDX-License-Identifier: MIT

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 4 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 7 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

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 make 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 6 of 7 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

pragma solidity ^0.8.0;

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

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

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawAll","type":"event"},{"inputs":[],"name":"LP_TOKEN","outputs":[{"internalType":"contract ILPToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAGIC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINICHEFV2","outputs":[{"internalType":"contract IMiniChefV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARDER","outputs":[{"internalType":"contract IREWARDER","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUSHI","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUSHI_ROUTER","outputs":[{"internalType":"contract ISushiSwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"_totalLPTokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"userBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"doHardWork","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimePoolWasAutoCompounded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"magicToEthPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salvageETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"salvageTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_devFee","type":"uint256"}],"name":"setDevFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_magicToEthPath","type":"address[]"}],"name":"setMagicToEthPath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_sushiToMagicPath","type":"address[]"}],"name":"setSushiToMagicPath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sushiToMagicPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","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":"address","name":"","type":"address"}],"name":"userShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506200001d33620002f2565b600180556040805160808101825273d4d42f0b6def4ce0383636770ef773390d85c61a815273ff970a61a04b1ca14834a43f5de4533ebddb5cc860208201527382af49447d8a07e3bd95bd0d56f35241523fbab19181019190915273539bde0d7dbd336b79148aa742883198bbf603426060820152620000a290600290600462000342565b506040805180820190915273539bde0d7dbd336b79148aa742883198bbf6034281527382af49447d8a07e3bd95bd0d56f35241523fbab16020820152620000ee90600390600262000342565b5060405163095ea7b360e01b815273d4d42f0b6def4ce0383636770ef773390d85c61a9063095ea7b3906200014090731b02da8cb0d097eb8d57a175b88c7d8b479975069060001990600401620003ee565b602060405180830381600087803b1580156200015b57600080fd5b505af115801562000170573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001969190620003c3565b5060405163095ea7b360e01b815273539bde0d7dbd336b79148aa742883198bbf603429063095ea7b390620001e890731b02da8cb0d097eb8d57a175b88c7d8b479975069060001990600401620003ee565b602060405180830381600087803b1580156200020357600080fd5b505af115801562000218573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200023e9190620003c3565b5060405163095ea7b360e01b815273b7e50106a5bd3cf21af210a755f9c8740890a8c99063095ea7b390620002909073f4d73326c13a4fc5fd7a064217e12780e9bd62c39060001990600401620003ee565b602060405180830381600087803b158015620002ab57600080fd5b505af1158015620002c0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002e69190620003c3565b50606460075562000407565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280548282559060005260206000209081019282156200039a579160200282015b828111156200039a57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000363565b50620003a8929150620003ac565b5090565b5b80821115620003a85760008155600101620003ad565b600060208284031215620003d657600080fd5b81518015158114620003e757600080fd5b9392505050565b6001600160a01b03929092168252602082015260400190565b611e9b80620004176000396000f3fe6080604052600436106101565760003560e01c806308fdf78b1461016257806309f39414146101795780630c24f4fa146101af5780631c75b6b2146101d75780632e1a7d4d146101f757806333144ad8146102175780633a98ef39146102375780634ef11d751461025b5780634fa5d8541461027d5780635e41813d146102925780636827e764146102ba5780636e3b72ca146102d057806370a08231146102f0578063715018a614610310578063853828b6146103255780638da5cb5b1461033a578063a4cdce821461034f578063ab560e101461036f578063b69ef8a814610397578063b6b55f25146103ac578063be9447f8146103cc578063bfd9041b146103e2578063d2890a011461040a578063db2e21bc14610420578063de69b3aa14610435578063e0d7d0e914610462578063eed007cd14610477578063f13a7a3114610497578063f2fde38b146104bf57600080fd5b3661015d57005b600080fd5b34801561016e57600080fd5b506101776104df565b005b34801561018557600080fd5b50610199610194366004611b09565b610532565b6040516101a69190611ba9565b60405180910390f35b3480156101bb57600080fd5b50610199731b02da8cb0d097eb8d57a175b88c7d8b4799750681565b3480156101e357600080fd5b506101776101f2366004611b09565b61055c565b34801561020357600080fd5b50610177610212366004611b09565b6105ce565b34801561022357600080fd5b50610199610232366004611b09565b610790565b34801561024357600080fd5b5061024d60055481565b6040519081526020016101a6565b34801561026757600080fd5b50610199600080516020611e4683398151915281565b34801561028957600080fd5b506101776107a0565b34801561029e57600080fd5b5061019973539bde0d7dbd336b79148aa742883198bbf6034281565b3480156102c657600080fd5b5061024d60075481565b3480156102dc57600080fd5b506101776102eb3660046119b9565b6107d6565b3480156102fc57600080fd5b5061024d61030b36600461199e565b61081c565b34801561031c57600080fd5b50610177610876565b34801561033157600080fd5b506101776108b1565b34801561034657600080fd5b506101996109fa565b34801561035b57600080fd5b5061017761036a3660046119b9565b610a09565b34801561037b57600080fd5b5061019973d4d42f0b6def4ce0383636770ef773390d85c61a81565b3480156103a357600080fd5b5061024d610a4b565b3480156103b857600080fd5b506101776103c7366004611b09565b610ad7565b3480156103d857600080fd5b5061024d60085481565b3480156103ee57600080fd5b5061019973b7e50106a5bd3cf21af210a755f9c8740890a8c981565b34801561041657600080fd5b5061024d60045481565b34801561042c57600080fd5b50610177610c7b565b34801561044157600080fd5b5061024d61045036600461199e565b60066020526000908152604090205481565b34801561046e57600080fd5b5061024d600d81565b34801561048357600080fd5b5061017761049236600461199e565b610dd4565b3480156104a357600080fd5b50610199731a9c20e2b0ac11ebecbdca626bba566c4ce8e60681565b3480156104cb57600080fd5b506101776104da36600461199e565b610ea6565b336104e86109fa565b6001600160a01b0316146105175760405162461bcd60e51b815260040161050e90611bf0565b60405180910390fd5b47801561052f5761052f6105296109fa565b82610f43565b50565b6002818154811061054257600080fd5b6000918252602090912001546001600160a01b0316905081565b336105656109fa565b6001600160a01b03161461058b5760405162461bcd60e51b815260040161050e90611bf0565b606460075411156105c95760405162461bcd60e51b81526020600482015260086024820152671b9bdd0818dbdbdb60c21b604482015260640161050e565b600755565b600260015414156105f15760405162461bcd60e51b815260040161050e90611c25565b60026001558061062e5760405162461bcd60e51b81526020600482015260086024820152670616d6f756e7420360c41b604482015260640161050e565b61063661105e565b6000610640610a4b565b9050600081600554846106539190611db7565b61065d9190611d95565b336000908152600660205260409020549091508111156106ac5760405162461bcd60e51b815260206004820152600a60248201526909cdee840cadcdeeaced60b31b604482015260640161050e565b33600090815260066020526040812080548392906106cb908490611dd6565b9250508190555080600560008282546106e49190611dd6565b9091555050604051630ad58d2f60e01b8152600080516020611e4683398151915290630ad58d2f9061071f90600d9087903390600401611d0b565b600060405180830381600087803b15801561073957600080fd5b505af115801561074d573d6000803e3d6000fd5b50506040518581523392507f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436491506020015b60405180910390a250506001805550565b6003818154811061054257600080fd5b600260015414156107c35760405162461bcd60e51b815260040161050e90611c25565b60026001556107d061105e565b60018055565b336107df6109fa565b6001600160a01b0316146108055760405162461bcd60e51b815260040161050e90611bf0565b805161081890600390602084019061190d565b5050565b600060055460001461086d576000610832610a4b565b6005546001600160a01b0385166000908152600660205260409020549192509061085c9083611db7565b6108669190611d95565b9392505050565b5060005b919050565b3361087f6109fa565b6001600160a01b0316146108a55760405162461bcd60e51b815260040161050e90611bf0565b6108af60006115d2565b565b600260015414156108d45760405162461bcd60e51b815260040161050e90611c25565b6002600155336000908152600660205260409020546109055760405162461bcd60e51b815260040161050e90611c5c565b61090d61105e565b60006109183361081c565b3360009081526006602052604081205460058054939450909290919061093f908490611dd6565b9091555050336000818152600660205260408082209190915551630ad58d2f60e01b8152600080516020611e4683398151915291630ad58d2f9161098b91600d91869190600401611d0b565b600060405180830381600087803b1580156109a557600080fd5b505af11580156109b9573d6000803e3d6000fd5b50506040518381523392507fd7a4aa9f3dca5f6606ac15d7e1850920201bbb02c38cd986793779f58ae0dfd391506020015b60405180910390a25060018055565b6000546001600160a01b031690565b33610a126109fa565b6001600160a01b031614610a385760405162461bcd60e51b815260040161050e90611bf0565b805161081890600290602084019061190d565b6040516393f1a40b60e01b8152600090600080516020611e46833981519152906393f1a40b90610a8290600d903090600401611c7e565b604080518083038186803b158015610a9957600080fd5b505afa158015610aad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad19190611b3b565b50919050565b60026001541415610afa5760405162461bcd60e51b815260040161050e90611c25565b600260015580610b415760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161050e565b610b4961105e565b6000610b53610a4b565b9050610b7573b7e50106a5bd3cf21af210a755f9c8740890a8c9333085611622565b604051638dbdbe6d60e01b8152600080516020611e4683398151915290638dbdbe6d90610bab90600d9086903090600401611d0b565b600060405180830381600087803b158015610bc557600080fd5b505af1158015610bd9573d6000803e3d6000fd5b505050506000600554600014610c09578160055484610bf89190611db7565b610c029190611d95565b9050610c0c565b50815b3360009081526006602052604081208054839290610c2b908490611d7d565b925050819055508060056000828254610c449190611d7d565b909155505060405183815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200161077f565b60026001541415610c9e5760405162461bcd60e51b815260040161050e90611c25565b600260015533600090815260066020526040902054610ccf5760405162461bcd60e51b815260040161050e90611c5c565b6000610cda3361081c565b33600090815260066020526040812054600580549394509092909190610d01908490611dd6565b9091555050336000908152600660205260408082209190915551630ad58d2f60e01b8152600080516020611e4683398151915290630ad58d2f90610d4e90600d9085903090600401611d0b565b600060405180830381600087803b158015610d6857600080fd5b505af1158015610d7c573d6000803e3d6000fd5b50610da2925073b7e50106a5bd3cf21af210a755f9c8740890a8c9915033905083611693565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695906020016109eb565b33610ddd6109fa565b6001600160a01b031614610e035760405162461bcd60e51b815260040161050e90611bf0565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610e32903090600401611ba9565b60206040518083038186803b158015610e4a57600080fd5b505afa158015610e5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e829190611b22565b9050801561081857610818610e956109fa565b6001600160a01b0384169083611693565b33610eaf6109fa565b6001600160a01b031614610ed55760405162461bcd60e51b815260040161050e90611bf0565b6001600160a01b038116610f3a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161050e565b61052f816115d2565b80471015610f935760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161050e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610fe0576040519150601f19603f3d011682016040523d82523d6000602084013e610fe5565b606091505b50509050806110595760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b606482015260840161050e565b505050565b6008544211156108af576040516370a0823160e01b815260009073b7e50106a5bd3cf21af210a755f9c8740890a8c9906370a08231906110a2903090600401611ba9565b60206040518083038186803b1580156110ba57600080fd5b505afa1580156110ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f29190611b22565b604051630c7e663b60e11b8152909150600080516020611e46833981519152906318fccc769061112990600d903090600401611c7e565b600060405180830381600087803b15801561114357600080fd5b505af1158015611157573d6000803e3d6000fd5b50506040516370a0823160e01b81526000925073d4d42f0b6def4ce0383636770ef773390d85c61a91506370a0823190611195903090600401611ba9565b60206040518083038186803b1580156111ad57600080fd5b505afa1580156111c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e59190611b22565b9050655af3107a400081111561128e576040516338ed173960e01b8152731b02da8cb0d097eb8d57a175b88c7d8b47997506906338ed17399061123690849060019060029030904290600401611c95565b600060405180830381600087803b15801561125057600080fd5b505af1158015611264573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261128c9190810190611a5c565b505b6040516370a0823160e01b815260009060029073539bde0d7dbd336b79148aa742883198bbf60342906370a08231906112cb903090600401611ba9565b60206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131b9190611b22565b6113259190611d95565b9050655af3107a40008111801561133e57506000600554115b15611059576040516318cbafe560e01b8152731b02da8cb0d097eb8d57a175b88c7d8b47997506906318cbafe59061138490849060019060039030904290600401611c95565b600060405180830381600087803b15801561139e57600080fd5b505af11580156113b2573d6000803e3d6000fd5b505060405163f305d71960e01b815273539bde0d7dbd336b79148aa742883198bbf6034260048201526024810184905260016044820181905260648201523060848201524260a4820152731b02da8cb0d097eb8d57a175b88c7d8b47997506925063f305d7199150479060c4016060604051808303818588803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906114719190611b5f565b50506040516370a0823160e01b815260009150849073b7e50106a5bd3cf21af210a755f9c8740890a8c9906370a08231906114b0903090600401611ba9565b60206040518083038186803b1580156114c857600080fd5b505afa1580156114dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115009190611b22565b61150a9190611dd6565b905060006103e86007548361151f9190611db7565b6115299190611d95565b90506115526115366109fa565b73b7e50106a5bd3cf21af210a755f9c8740890a8c99083611693565b61155c8183611dd6565b604051638dbdbe6d60e01b8152909250600080516020611e4683398151915290638dbdbe6d9061159590600d9086903090600401611d0b565b600060405180830381600087803b1580156115af57600080fd5b505af11580156115c3573d6000803e3d6000fd5b50504260085550505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261168d9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526116c3565b50505050565b6040516001600160a01b03831660248201526044810182905261105990849063a9059cbb60e01b90606401611656565b6000611718826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117959092919063ffffffff16565b80519091501561105957808060200190518101906117369190611ae7565b6110595760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161050e565b60606117a484846000856117ac565b949350505050565b60608247101561180d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161050e565b843b61185b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161050e565b600080866001600160a01b031685876040516118779190611b8d565b60006040518083038185875af1925050503d80600081146118b4576040519150601f19603f3d011682016040523d82523d6000602084013e6118b9565b606091505b50915091506118c98282866118d4565b979650505050505050565b606083156118e3575081610866565b8251156118f35782518084602001fd5b8160405162461bcd60e51b815260040161050e9190611bbd565b828054828255906000526020600020908101928215611962579160200282015b8281111561196257825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061192d565b5061196e929150611972565b5090565b5b8082111561196e5760008155600101611973565b80356001600160a01b038116811461087157600080fd5b6000602082840312156119b057600080fd5b61086682611987565b600060208083850312156119cc57600080fd5b82356001600160401b038111156119e257600080fd5b8301601f810185136119f357600080fd5b8035611a06611a0182611d5a565b611d2a565b80828252848201915084840188868560051b8701011115611a2657600080fd5b600094505b83851015611a5057611a3c81611987565b835260019490940193918501918501611a2b565b50979650505050505050565b60006020808385031215611a6f57600080fd5b82516001600160401b03811115611a8557600080fd5b8301601f81018513611a9657600080fd5b8051611aa4611a0182611d5a565b80828252848201915084840188868560051b8701011115611ac457600080fd5b600094505b83851015611a50578051835260019490940193918501918501611ac9565b600060208284031215611af957600080fd5b8151801515811461086657600080fd5b600060208284031215611b1b57600080fd5b5035919050565b600060208284031215611b3457600080fd5b5051919050565b60008060408385031215611b4e57600080fd5b505080516020909101519092909150565b600080600060608486031215611b7457600080fd5b8351925060208401519150604084015190509250925092565b60008251611b9f818460208701611ded565b9190910192915050565b6001600160a01b0391909116815260200190565b6020815260008251806020840152611bdc816040850160208701611ded565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260089082015267073686172657320360c41b604082015260600190565b9182526001600160a01b0316602082015260400190565b600060a082018783526020878185015260a0604085015281875480845260c0860191508860005282600020935060005b81811015611cea5784546001600160a01b031683526001948501949284019201611cc5565b50506001600160a01b03969096166060850152505050608001529392505050565b92835260208301919091526001600160a01b0316604082015260600190565b604051601f8201601f191681016001600160401b0381118282101715611d5257611d52611e2f565b604052919050565b60006001600160401b03821115611d7357611d73611e2f565b5060051b60200190565b60008219821115611d9057611d90611e19565b500190565b600082611db257634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611dd157611dd1611e19565b500290565b600082821015611de857611de8611e19565b500390565b60005b83811015611e08578181015183820152602001611df0565b8381111561168d5750506000910152565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe000000000000000000000000f4d73326c13a4fc5fd7a064217e12780e9bd62c3a2646970667358221220069c4d7feb521e7646a81bf061ed08c3659c51c93dae7c1fef8d906fb862e1b864736f6c63430008060033

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.