Contract 0xcc0a87f7e7c693042a9cc703661f5060c80acb43 7

Contract Overview

Tomb Finance: TSHARE Rewards Pool
Balance:
0 FTM

FTM Value:
$0.00
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x0b6cfd767eba533e108f5ce82d9047eda27c85f8939e4c9ff6eb1bcd4b6e0340Withdraw384824372022-05-18 2:38:412 mins ago0x5729c8c5902f2090f1addf6821b777f6337c2043 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.041969661464
0x40bce5852d975d0a32a9c38fea76d5e85786c781634db5654307aeb58c082d9dWithdraw384824202022-05-18 2:38:063 mins ago0x5729c8c5902f2090f1addf6821b777f6337c2043 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.06063879683
0x4858df0540c0bf87020b7cb743fe3dad5cd56d1cbd0f782262a5b460ed79c02eWithdraw384823802022-05-18 2:36:584 mins ago0x3930de2e3b3f84d39bc3107aca092351d5c68f53 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.059968849206
0xfbbc8c6477bf33f6f0cd226adbed1748328a509d28cafb204383236471e62c26Withdraw384822782022-05-18 2:34:146 mins ago0x61560578483faaffa3c8db1b0f4ad675ed1068e1 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.049158020281
0x129f0b92fad5c252d964aac0c469c4ab1015ab65a78c8be5f93b61fba4b6b195Deposit384820452022-05-18 2:27:4913 mins ago0x4408e04e4d8aeb7edbc0bc0ae66028762fdf29e5 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.058574212971
0x3437d703555fbbfaa119e939a8a09de530ec3ceeb7e7cad18cab6ac1f7e05d3fDeposit384818372022-05-18 2:21:3819 mins ago0x3fca7e24a0b3827ac1a602071e9a4a18b8893eab IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.055211982432
0xc848d98fcff2ca48e2e4fa2f0ee79624fb297c2b761d53a807296d8df36d78bfDeposit384817502022-05-18 2:19:0821 mins ago0x75187ba60cafc4a2cb057aaddd5c9fdac3896cee IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.059484833681
0x1ee28cfbeac80a838806945818d9ea7be1bc3ffe83afd3aedf1fbbfca5f73a37Withdraw384817082022-05-18 2:18:1322 mins ago0x2112675175dd1bdc5b52d5e5299ce2070a3ef90a IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.041472971335
0xb9438bde69f2f36a57d09070c432acd90e2ca8e2a12b106d0d6c8df5e7156533Withdraw384816712022-05-18 2:17:2423 mins ago0x4ab52bdeb43f7de7632455491e90ea70cf81d25b IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.03112210789
0x876fb407d48e9c6f094dea601f0423de3cdb5bd43a44f14b02c92df1c9db8481Withdraw384816702022-05-18 2:17:2123 mins ago0x2112675175dd1bdc5b52d5e5299ce2070a3ef90a IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.046847407704
0x7471b1e78af43c7d21479965c44ce9a705bda9fc286596fb041149da6961dbe4Withdraw384816662022-05-18 2:17:1523 mins ago0x3fca7e24a0b3827ac1a602071e9a4a18b8893eab IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.027233122417
0xccaef4919e9902a56bd92a88b679f86447fe426de91cc57a54589857a999d055Withdraw384816622022-05-18 2:17:1023 mins ago0x2c4eedc71d1d745a60ed8a80f80eb6bdd50521d5 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.047001185173
0x58342f8b72fbed72be777ef73a99d5ccb6ee4b08f406ce448f0c8daa698f7800Withdraw384816532022-05-18 2:16:5624 mins ago0x3fca7e24a0b3827ac1a602071e9a4a18b8893eab IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.042066944161
0xd6e8a41342f453fdd5bb180433b0bb67ebfcf19940a3d397b4a43766c0a3f963Withdraw384816452022-05-18 2:16:4524 mins ago0xb39bed744a8ab754109c1987290b93da744e36ec IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.048658627995
0x175b5584d49f57b1992aabf22068bee8fa3ac159d8357fccd6b2965cfbeb7323Withdraw384816222022-05-18 2:16:0225 mins ago0x4ab52bdeb43f7de7632455491e90ea70cf81d25b IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.046701414088
0xea42d25e784a9df48f1c5f4ec6502c9444ec069e1d2f8b1b910bb2224e1cb294Deposit384815542022-05-18 2:14:0327 mins ago0x01dd5c4dc2b4697f10f9e6e7c6f92bd4b8333653 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.043927194969
0xc167cea3be3651933d3d33ac5cb48e260c175ef03ddd5b7ace9f37cd86cfbdf1Withdraw384811402022-05-18 2:02:5038 mins ago0xe49a2a07d3c117ebfd0618a4feb4900d7f95f1ae IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.031037376069
0x00442f065a0c32439e2466f3793daf241413911dde8d9bfe0d3e3038b813cdc7Withdraw384811342022-05-18 2:02:3838 mins ago0xf1240b447922b2fece19d7a0ba44efb0f3765c53 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.031616144095
0x491f01ad942a6ac29bb1411152c6c6210aef63c7607751322b1fde47c3b7943eDeposit384810522022-05-18 2:00:2040 mins ago0xe49a2a07d3c117ebfd0618a4feb4900d7f95f1ae IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.041845488143
0x042c23467ef541d1289042b0da3ac536bfb3015151f3b286e47c6a002bec3747Withdraw384810502022-05-18 2:00:1840 mins ago0x63029dd1b4bc03acd5105cd29aa1aaee1dc19838 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.029969670334
0x2d108e09cb83069ade639b471cd305b966c7486a910baaa95c35a632bd50d313Withdraw384810432022-05-18 2:00:0840 mins ago0x56d5670d019eff1c41deaf2a1fb604d055d0cb6e IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.029642255921
0xf138f74517245159eae823663daa34b12f57f24ce874efe879e66847631eebacWithdraw384810312022-05-18 1:59:4341 mins ago0x758f5445891d9e840fc7db722c354d0457d87a9e IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.029567539643
0xb412547044238e1b5c17798587488f1a1387b4213f9c2375d97fae5a5253be4eWithdraw384810122022-05-18 1:59:0941 mins ago0x75187ba60cafc4a2cb057aaddd5c9fdac3896cee IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.027385492454
0xcd405f7d950a496010797db2fc26a71adf28b0f75af0294c8303a250ea533da2Withdraw384810122022-05-18 1:59:0941 mins ago0xfa79458667dbc4feeda6aa6cdba90c32c582ca74 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.019490985713
0xe0dc5c4e43507d3f877fdbd8e07adf2febd3e432d7d1e8bfc782e3338880116eWithdraw384809222022-05-18 1:56:2944 mins ago0x01dd5c4dc2b4697f10f9e6e7c6f92bd4b8333653 IN  Tomb Finance: TSHARE Rewards Pool0 FTM0.020601257662
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x34365b22f3e16f57d805d232919cc7c91e6bd951476c04070ac9ecb260814901328938922022-03-08 17:32:5770 days 9 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool9.99 FTM
0x7d6d83d6d714fa40be2b880df89bb65a1986b4103a0fa2b5a88c3e8318fea24c323034862022-03-01 20:51:1177 days 5 hrs ago 0x33a64dcdfa041befebc9161a3e0c6180cd94fa89 Tomb Finance: TSHARE Rewards Pool38.301749750000001024 FTM
0xcb88db2dd5252a329a60da41bd1600721a3b325a12e68fe2c2dc399a41a53ff1320660502022-02-27 2:50:2979 days 23 hrs ago 0x82235938a27efc6963dbca2a6a2441199339e92d Tomb Finance: TSHARE Rewards Pool54 FTM
0x90c95d979ab6164646a00abf2634ab294c9405ce6d337f9464fd6cb52e4014c3315629252022-02-21 0:04:2786 days 2 hrs ago 0x0834b89388a098b707f3351a3fb7d8dfd696cad4 Tomb Finance: TSHARE Rewards Pool330 FTM
0x1051aed4e0aa3aa73889467a349fe63e7ff07c3d7c3e34999b220d8511e06112315628362022-02-21 0:02:3986 days 2 hrs ago 0x0834b89388a098b707f3351a3fb7d8dfd696cad4 Tomb Finance: TSHARE Rewards Pool330 FTM
0xcdb3fd877cc583de63d0d751ea6d7a6a4d0e7f6678866f18ee5719984a99b4a4304460682022-02-09 10:49:3197 days 15 hrs ago 0x59ea68823455fbf937f0117786d76e6d073d5b2b Tomb Finance: TSHARE Rewards Pool0.875175363500064798 FTM
0xcf11c2cb48f039daeedabb4330da70dc7ff01c8a7b327f2d5a42c35408d01229304459992022-02-09 10:48:3697 days 15 hrs ago 0x59ea68823455fbf937f0117786d76e6d073d5b2b Tomb Finance: TSHARE Rewards Pool0.879945158600064798 FTM
0x910183504cc509f679e3b1cbed47bb1a98e7f7e4a81918405b15ae11b5e28d94294083372022-01-29 19:01:21108 days 7 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool49.99 FTM
0x4be12a5aa18b991679586b52a8c6a02a373e3b77fb3717c92692a35d1f9374f2287440332022-01-22 17:41:39115 days 8 hrs ago 0x33f784f3a466971bff3fdf551ee897776ce8099d Tomb Finance: TSHARE Rewards Pool5.04534984389388917 FTM
0xdf7237bffe72d2236e6fa94641d4e60290477176e7ec9951e139ec323a1cc4bd287438352022-01-22 17:37:35115 days 9 hrs ago 0x33f784f3a466971bff3fdf551ee897776ce8099d Tomb Finance: TSHARE Rewards Pool5.07159661829388917 FTM
0xca924f47ee71f04487d67fb014e5d08697e7676f9e96dac94245558c323b5aa3282597242022-01-17 16:58:52120 days 9 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool9.99 FTM
0xa99094f35947e54b425cd6a2afe75f16459d0f6c27632e38ff88272b6c555095279750912022-01-14 22:17:18123 days 4 hrs ago 0xfcec73c3bb0453e3ee532de42c359b5c75e18cb6 Tomb Finance: TSHARE Rewards Pool46.9445055539791 FTM
0xe8a9a2434540e7fc62a40ff6d4bc394bf09945f6424ce45d913644aa08c3d4d4279708112022-01-14 21:13:10123 days 5 hrs ago 0xfcec73c3bb0453e3ee532de42c359b5c75e18cb6 Tomb Finance: TSHARE Rewards Pool46.9522046789791 FTM
0x5d76f413f63165530cd8a7b7cd4e7740ffcc30e8992b588c5255d00670d5a836279707522022-01-14 21:12:24123 days 5 hrs ago 0xfcec73c3bb0453e3ee532de42c359b5c75e18cb6 Tomb Finance: TSHARE Rewards Pool46.9575158393791 FTM
0x1fcc3d4b46238231574764253cefbcb907b3df373ef0969c142cca85dafb93b2272867482022-01-07 19:02:26130 days 7 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool10.99 FTM
0xf4b93e2f09602d1671010444cd208b6643c44ada8a08acc57c1246a230fb1aeb260595872021-12-26 4:10:40142 days 22 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool1,260.99 FTM
0x49e6398d0b550d9fe9069789543e4205b3841939239c34f65aa2c4ea18886e3e258175862021-12-23 16:35:03145 days 10 hrs ago 0xd590d55ec99763e4146413603bf767cfd3f61961 Tomb Finance: TSHARE Rewards Pool80 FTM
0x2b6a5ba8fcbc8cfa8a0e46f5f56cc377ffb420644eb17d3fa402a8b2df54f7ee241438502021-12-06 9:39:04162 days 17 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool195.884 FTM
0x40699cd9c910370d56a38c60addc8e2d1df6365c249a96ac49f3151504d18eb7236762732021-12-01 13:09:06167 days 13 hrs ago 0xe53a7e1ddc0e99d5eb9e84798661a6dfa8a8ca02 Tomb Finance: TSHARE Rewards Pool1 FTM
0x1aad418770ab380e22f64923a75f0921a47a5c7f46e546426f43e17bf5cbf2fe236761222021-12-01 13:07:07167 days 13 hrs ago 0xe53a7e1ddc0e99d5eb9e84798661a6dfa8a8ca02 Tomb Finance: TSHARE Rewards Pool1 FTM
0x081d3e7c4c4c69be40d9a869fb5118096847b4469a28d4faa1c4df85699a5854236760102021-12-01 13:05:39167 days 13 hrs ago 0xe53a7e1ddc0e99d5eb9e84798661a6dfa8a8ca02 Tomb Finance: TSHARE Rewards Pool1 FTM
0x966b66d267cfc21ff5328ab2d0f1b6604013a6c56aed05e39b067dea27daa366236759212021-12-01 13:04:07167 days 13 hrs ago 0xe53a7e1ddc0e99d5eb9e84798661a6dfa8a8ca02 Tomb Finance: TSHARE Rewards Pool1.989639944 FTM
0x8f0484b1748b5310b10df5b596f4b039e1f4ed1619adafc3d7759e7edd839e38236729642021-12-01 12:19:01167 days 14 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool3 FTM
0x0c9a515feadadbfa53c580d0ca3ce4529e78a09b0bc5758d06342616f1d4c305233781462021-11-28 12:05:29170 days 14 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool3.99 FTM
0xa70e7a6b547387c3293301ddbef836d4b107104be4bc71763b1ef4cd0c0140c4233739552021-11-28 11:01:53170 days 15 hrs ago 0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3 Tomb Finance: TSHARE Rewards Pool99.99 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TShareRewardPool

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 5 : TShareRewardPool.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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

// Note that this pool has no minter key of tSHARE (rewards).
// Instead, the governance will call tSHARE distributeReward method and send reward to this pool at the beginning.
contract TShareRewardPool {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // governance
    address public operator;

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

    // Info of each pool.
    struct PoolInfo {
        IERC20 token; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. tSHAREs to distribute per block.
        uint256 lastRewardTime; // Last time that tSHAREs distribution occurs.
        uint256 accTSharePerShare; // Accumulated tSHAREs per share, times 1e18. See below.
        bool isStarted; // if lastRewardTime has passed
    }

    IERC20 public tshare;

    // 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 time when tSHARE mining starts.
    uint256 public poolStartTime;

    // The time when tSHARE mining ends.
    uint256 public poolEndTime;

    uint256 public tSharePerSecond = 0.00186122 ether; // 59500 tshare / (370 days * 24h * 60min * 60s)
    uint256 public runningTime = 370 days; // 370 days
    uint256 public constant TOTAL_REWARDS = 59500 ether;

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

    constructor(
        address _tshare,
        uint256 _poolStartTime
    ) public {
        require(block.timestamp < _poolStartTime, "late");
        if (_tshare != address(0)) tshare = IERC20(_tshare);
        poolStartTime = _poolStartTime;
        poolEndTime = poolStartTime + runningTime;
        operator = msg.sender;
    }

    modifier onlyOperator() {
        require(operator == msg.sender, "TShareRewardPool: caller is not the operator");
        _;
    }

    function checkPoolDuplicate(IERC20 _token) internal view {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            require(poolInfo[pid].token != _token, "TShareRewardPool: existing pool?");
        }
    }

    // Add a new lp to the pool. Can only be called by the owner.
    function add(
        uint256 _allocPoint,
        IERC20 _token,
        bool _withUpdate,
        uint256 _lastRewardTime
    ) public onlyOperator {
        checkPoolDuplicate(_token);
        if (_withUpdate) {
            massUpdatePools();
        }
        if (block.timestamp < poolStartTime) {
            // chef is sleeping
            if (_lastRewardTime == 0) {
                _lastRewardTime = poolStartTime;
            } else {
                if (_lastRewardTime < poolStartTime) {
                    _lastRewardTime = poolStartTime;
                }
            }
        } else {
            // chef is cooking
            if (_lastRewardTime == 0 || _lastRewardTime < block.timestamp) {
                _lastRewardTime = block.timestamp;
            }
        }
        bool _isStarted =
        (_lastRewardTime <= poolStartTime) ||
        (_lastRewardTime <= block.timestamp);
        poolInfo.push(PoolInfo({
            token : _token,
            allocPoint : _allocPoint,
            lastRewardTime : _lastRewardTime,
            accTSharePerShare : 0,
            isStarted : _isStarted
            }));
        if (_isStarted) {
            totalAllocPoint = totalAllocPoint.add(_allocPoint);
        }
    }

    // Update the given pool's tSHARE allocation point. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint) public onlyOperator {
        massUpdatePools();
        PoolInfo storage pool = poolInfo[_pid];
        if (pool.isStarted) {
            totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(
                _allocPoint
            );
        }
        pool.allocPoint = _allocPoint;
    }

    // Return accumulate rewards over the given _from to _to block.
    function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) {
        if (_fromTime >= _toTime) return 0;
        if (_toTime >= poolEndTime) {
            if (_fromTime >= poolEndTime) return 0;
            if (_fromTime <= poolStartTime) return poolEndTime.sub(poolStartTime).mul(tSharePerSecond);
            return poolEndTime.sub(_fromTime).mul(tSharePerSecond);
        } else {
            if (_toTime <= poolStartTime) return 0;
            if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(tSharePerSecond);
            return _toTime.sub(_fromTime).mul(tSharePerSecond);
        }
    }

    // View function to see pending tSHAREs on frontend.
    function pendingShare(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accTSharePerShare = pool.accTSharePerShare;
        uint256 tokenSupply = pool.token.balanceOf(address(this));
        if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) {
            uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
            uint256 _tshareReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
            accTSharePerShare = accTSharePerShare.add(_tshareReward.mul(1e18).div(tokenSupply));
        }
        return user.amount.mul(accTSharePerShare).div(1e18).sub(user.rewardDebt);
    }

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

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.timestamp <= pool.lastRewardTime) {
            return;
        }
        uint256 tokenSupply = pool.token.balanceOf(address(this));
        if (tokenSupply == 0) {
            pool.lastRewardTime = block.timestamp;
            return;
        }
        if (!pool.isStarted) {
            pool.isStarted = true;
            totalAllocPoint = totalAllocPoint.add(pool.allocPoint);
        }
        if (totalAllocPoint > 0) {
            uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
            uint256 _tshareReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
            pool.accTSharePerShare = pool.accTSharePerShare.add(_tshareReward.mul(1e18).div(tokenSupply));
        }
        pool.lastRewardTime = block.timestamp;
    }

    // Deposit LP tokens.
    function deposit(uint256 _pid, uint256 _amount) public {
        address _sender = msg.sender;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 _pending = user.amount.mul(pool.accTSharePerShare).div(1e18).sub(user.rewardDebt);
            if (_pending > 0) {
                safeTShareTransfer(_sender, _pending);
                emit RewardPaid(_sender, _pending);
            }
        }
        if (_amount > 0) {
            pool.token.safeTransferFrom(_sender, address(this), _amount);
            user.amount = user.amount.add(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accTSharePerShare).div(1e18);
        emit Deposit(_sender, _pid, _amount);
    }

    // Withdraw LP tokens.
    function withdraw(uint256 _pid, uint256 _amount) public {
        address _sender = msg.sender;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 _pending = user.amount.mul(pool.accTSharePerShare).div(1e18).sub(user.rewardDebt);
        if (_pending > 0) {
            safeTShareTransfer(_sender, _pending);
            emit RewardPaid(_sender, _pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.token.safeTransfer(_sender, _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accTSharePerShare).div(1e18);
        emit Withdraw(_sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 _amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.token.safeTransfer(msg.sender, _amount);
        emit EmergencyWithdraw(msg.sender, _pid, _amount);
    }

    // Safe tshare transfer function, just in case if rounding error causes pool to not have enough tSHAREs.
    function safeTShareTransfer(address _to, uint256 _amount) internal {
        uint256 _tshareBal = tshare.balanceOf(address(this));
        if (_tshareBal > 0) {
            if (_amount > _tshareBal) {
                tshare.safeTransfer(_to, _tshareBal);
            } else {
                tshare.safeTransfer(_to, _amount);
            }
        }
    }

    function setOperator(address _operator) external onlyOperator {
        operator = _operator;
    }

    function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to) external onlyOperator {
        if (block.timestamp < poolEndTime + 90 days) {
            // do not allow to drain core token (tSHARE or lps) if less than 90 days after pool ends
            require(_token != tshare, "tshare");
            uint256 length = poolInfo.length;
            for (uint256 pid = 0; pid < length; ++pid) {
                PoolInfo storage pool = poolInfo[pid];
                require(_token != pool.token, "pool.token");
            }
        }
        _token.safeTransfer(to, amount);
    }
}

File 2 of 5 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when 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.
 */
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) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        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) {
        // 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) {
        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) {
        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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        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) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @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. 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) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        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) {
        require(b > 0, "SafeMath: modulo by zero");
        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) {
        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.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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) {
        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) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

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

pragma solidity >=0.6.0 <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 4 of 5 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.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 SafeMath for uint256;
    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity >=0.6.2 <0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tshare","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","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":[],"name":"TOTAL_REWARDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"add","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"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accTSharePerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tSharePerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tshare","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","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":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060045566069cc50cf2e8006007556301e7cb0060085534801561002857600080fd5b50604051611d98380380611d988339818101604052604081101561004b57600080fd5b508051602090910151428111610091576040805162461bcd60e51b815260206004808301919091526024820152636c61746560e01b604482015290519081900360640190fd5b6001600160a01b038216156100bc57600180546001600160a01b0319166001600160a01b0384161790555b60058190556008540160065550600080546001600160a01b03191633179055611cae806100ea6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c80635f96dc11116100d857806396805e541161008c578063cf4b55cb11610066578063cf4b55cb1461040c578063e2bbb15814610445578063ee6822a71461046857610177565b806396805e541461038a5780639e63d261146103d1578063b3ab15fb146103d957610177565b80636e271dd5116100bd5780636e271dd51461032857806393f1a40b14610330578063943f013d1461038257610177565b80635f96dc1114610318578063630b5ba11461032057610177565b8063441a3e701161012f5780635312ea8e116101145780635312ea8e1461028757806354575af4146102a4578063570ca735146102e757610177565b8063441a3e701461024757806351eb05a61461026a57610177565b806317caf6f11161016057806317caf6f1146101f75780631ab06ee5146101ff578063231f0c6a1461022457610177565b806309cf60911461017c5780631526fe2714610196575b600080fd5b610184610470565b60408051918252519081900360200190f35b6101b3600480360360208110156101ac57600080fd5b503561047e565b6040805173ffffffffffffffffffffffffffffffffffffffff9096168652602086019490945284840192909252606084015215156080830152519081900360a00190f35b6101846104d6565b6102226004803603604081101561021557600080fd5b50803590602001356104dc565b005b6101846004803603604081101561023a57600080fd5b50803590602001356105b1565b6102226004803603604081101561025d57600080fd5b5080359060200135610676565b6102226004803603602081101561028057600080fd5b503561088c565b6102226004803603602081101561029d57600080fd5b5035610a2e565b610222600480360360608110156102ba57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359160409091013516610ad7565b6102ef610ccb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610184610ce7565b610222610ced565b610184610d10565b6103696004803603604081101561034657600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610d16565b6040805192835260208301919091528051918290030190f35b610184610d3a565b610222600480360360808110156103a057600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff60208201351690604081013515159060600135610d40565b610184610fa7565b610222600480360360208110156103ef57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610fad565b6101846004803603604081101561042257600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611064565b6102226004803603604081101561045b57600080fd5b50803590602001356111e6565b6102ef61138a565b690c99805fe37d3e30000081565b6002818154811061048b57fe5b60009182526020909120600590910201805460018201546002830154600384015460049094015473ffffffffffffffffffffffffffffffffffffffff90931694509092909160ff1685565b60045481565b60005473ffffffffffffffffffffffffffffffffffffffff16331461054c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611bdc602c913960400191505060405180910390fd5b610554610ced565b60006002838154811061056357fe5b60009182526020909120600590910201600481015490915060ff16156105aa576105a6826105a083600101546004546113a690919063ffffffff16565b9061141d565b6004555b6001015550565b60008183106105c257506000610670565b600654821061062a5760065483106105dc57506000610670565b600554831161060f576106086007546106026005546006546113a690919063ffffffff16565b90611498565b9050610670565b610608600754610602856006546113a690919063ffffffff16565b600554821161063b57506000610670565b600554831161065f57610608600754610602600554856113a690919063ffffffff16565b6007546106089061060284866113a6565b92915050565b600033905060006002848154811061068a57fe5b6000918252602080832087845260038252604080852073ffffffffffffffffffffffffffffffffffffffff88168652909252922080546005909202909201925084111561073857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b6107418561088c565b600061077e8260010154610778670de0b6b3a76400006107728760030154876000015461149890919063ffffffff16565b9061150b565b906113a6565b905080156107dd57610790848261158c565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff8616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b84156108145781546107ef90866113a6565b825582546108149073ffffffffffffffffffffffffffffffffffffffff168587611682565b6003830154825461083291670de0b6b3a76400009161077291611498565b6001830155604080518681529051879173ffffffffffffffffffffffffffffffffffffffff8716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b60006002828154811061089b57fe5b90600052602060002090600502019050806002015442116108bc5750610a2b565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561092c57600080fd5b505afa158015610940573d6000803e3d6000fd5b505050506040513d602081101561095657600080fd5b505190508061096c575042600290910155610a2b565b600482015460ff166109bb57600480830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915583015490546109b79161141d565b6004555b60045415610a225760006109d38360020154426105b1565b905060006109f460045461077286600101548561149890919063ffffffff16565b9050610a1a610a0f8461077284670de0b6b3a7640000611498565b60038601549061141d565b600385015550505b50426002909101555b50565b600060028281548110610a3d57fe5b600091825260208083208584526003825260408085203380875293528420805485825560018201959095556005909302018054909450919291610a9a9173ffffffffffffffffffffffffffffffffffffffff919091169083611682565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611bdc602c913960400191505060405180910390fd5b6006546276a70001421015610ca55760015473ffffffffffffffffffffffffffffffffffffffff84811691161415610be057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f7473686172650000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60025460005b81811015610ca257600060028281548110610bfd57fe5b60009182526020909120600590910201805490915073ffffffffffffffffffffffffffffffffffffffff87811691161415610c9957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f706f6f6c2e746f6b656e00000000000000000000000000000000000000000000604482015290519081900360640190fd5b50600101610be6565b50505b610cc673ffffffffffffffffffffffffffffffffffffffff84168284611682565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60025460005b81811015610d0c57610d048161088c565b600101610cf3565b5050565b60065481565b60036020908152600092835260408084209091529082529020805460019091015482565b60085481565b60005473ffffffffffffffffffffffffffffffffffffffff163314610db0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611bdc602c913960400191505060405180910390fd5b610db98361170f565b8115610dc757610dc7610ced565b600554421015610df35780610ddf5750600554610dee565b600554811015610dee57506005545b610e07565b801580610dff57504281105b15610e075750425b600060055482111580610e1a5750428211155b6040805160a08101825273ffffffffffffffffffffffffffffffffffffffff878116825260208201898152928201868152600060608401818152861580156080870190815260028054600181018255945295517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600590940293840180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919096161790945594517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf82015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad082015592517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad184015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad290920180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001692151592909217909155909150610fa057600454610f9c908661141d565b6004555b5050505050565b60075481565b60005473ffffffffffffffffffffffffffffffffffffffff16331461101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611bdc602c913960400191505060405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000806002848154811061107457fe5b600091825260208083208784526003808352604080862073ffffffffffffffffffffffffffffffffffffffff808b168852908552818720600590960290930191820154825482517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015292519398509596909590949316926370a0823192602480840193829003018186803b15801561111257600080fd5b505afa158015611126573d6000803e3d6000fd5b505050506040513d602081101561113c57600080fd5b505160028501549091504211801561115357508015155b156111b05760006111688560020154426105b1565b9050600061118960045461077288600101548561149890919063ffffffff16565b90506111ab6111a48461077284670de0b6b3a7640000611498565b859061141d565b935050505b6111db8360010154610778670de0b6b3a764000061077286886000015461149890919063ffffffff16565b979650505050505050565b60003390506000600284815481106111fa57fe5b6000918252602080832087845260038252604080852073ffffffffffffffffffffffffffffffffffffffff881686529092529220600590910290910191506112418561088c565b8054156112da5760006112798260010154610778670de0b6b3a76400006107728760030154876000015461149890919063ffffffff16565b905080156112d85761128b848261158c565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff8616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505b83156113135781546113049073ffffffffffffffffffffffffffffffffffffffff168430876117dd565b8054611310908561141d565b81555b6003820154815461133191670de0b6b3a76400009161077291611498565b6001820155604080518581529051869173ffffffffffffffffffffffffffffffffffffffff8616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60008282111561141757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561149157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000826114a757506000610670565b828202828482816114b457fe5b0414611491576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611c2e6021913960400191505060405180910390fd5b600080821161157b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161158457fe5b049392505050565b600154604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b1580156115fd57600080fd5b505afa158015611611573d6000803e3d6000fd5b505050506040513d602081101561162757600080fd5b505190508015610cc657808211156116625760015461165d9073ffffffffffffffffffffffffffffffffffffffff168483611682565b610cc6565b600154610cc69073ffffffffffffffffffffffffffffffffffffffff1684845b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610cc6908490611878565b60025460005b81811015610cc6578273ffffffffffffffffffffffffffffffffffffffff166002828154811061174157fe5b600091825260209091206005909102015473ffffffffffffffffffffffffffffffffffffffff1614156117d557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f545368617265526577617264506f6f6c3a206578697374696e6720706f6f6c3f604482015290519081900360640190fd5b600101611715565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611872908590611878565b50505050565b60606118da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166119509092919063ffffffff16565b805190915015610cc6578080602001905160208110156118f957600080fd5b5051610cc6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611c4f602a913960400191505060405180910390fd5b606061195f8484600085611967565b949350505050565b6060824710156119c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611c086026913960400191505060405180910390fd5b6119cb85611b17565b611a3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310611aa057805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611a63565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611b02576040519150601f19603f3d011682016040523d82523d6000602084013e611b07565b606091505b50915091506111db828286611b1d565b3b151590565b60608315611b2c575081611491565b825115611b3c5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ba0578181015183820152602001611b88565b50505050905090810190601f168015611bcd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe545368617265526577617264506f6f6c3a2063616c6c6572206973206e6f7420746865206f70657261746f72416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122000f06b727aab982452086d289439b18aafda67aaf3bd085b0d8525e3cdf7a85564736f6c634300060c00330000000000000000000000004cdf39285d7ca8eb3f090fda0c069ba5f4145b370000000000000000000000000000000000000000000000000000000060be1148

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

0000000000000000000000004cdf39285d7ca8eb3f090fda0c069ba5f4145b370000000000000000000000000000000000000000000000000000000060be1148

-----Decoded View---------------
Arg [0] : _tshare (address): 0x4cdf39285d7ca8eb3f090fda0c069ba5f4145b37
Arg [1] : _poolStartTime (uint256): 1623069000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004cdf39285d7ca8eb3f090fda0c069ba5f4145b37
Arg [1] : 0000000000000000000000000000000000000000000000000000000060be1148


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.