Contract 0x042ef08aE39D2493eBf3864555f1157445FAD6A6

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x661bc4613de9af691217d76a2eafa850b46cd27ad5ce0d5a0997607a4f7681e1Withdraw96693412021-08-01 22:04:33123 days 15 hrs ago0xcfe91f60fe7b174d557106f86ec0577c12cba7b5 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000206315
0x353006c35a6cc0542b4dd519b6dd21d584c5636eb0b3f193f320ea29e3853d8bWithdraw96136542021-07-30 22:16:54125 days 15 hrs ago0x008149bf11b900366ec59fe0036ad1a18571bfdc IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000206315
0xcc31f0ce9700640720249e957d2e91ce83edfa4c1c0235b20fee07a3325cc743Withdraw94183392021-07-23 20:55:42132 days 16 hrs ago0xb9bc4504281f8488eea5559a65b462689699d10f IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000296905
0xd74af0f470e3fc0d8c836852dc334b53a107d9d55faaee09257acd3281331aa9Withdraw92882362021-07-19 8:20:00137 days 5 hrs ago0x2cc9dca24ccd6593783c1884af79f9eb227c7149 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000206315
0x78e507f983a92d7558433432f42c8670b05eedcd2d5638a6e4e9f6ba373d25a0Withdraw92524972021-07-18 2:32:15138 days 10 hrs ago0xa75f1aaea1d18bf81307543c7f955041d7048a52 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000296905
0xd5fe3990897fe3c5287a4dd6aa2ee4634c347a769d6bf94dd0f7512040ece102Withdraw92524882021-07-18 2:31:48138 days 10 hrs ago0xa75f1aaea1d18bf81307543c7f955041d7048a52 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000475048
0x4d8317a6191c64cdedc1c010da9ed6c4a0dce9571c775e1adbc6ff53ca6276e8Withdraw92524712021-07-18 2:30:57138 days 10 hrs ago0xa75f1aaea1d18bf81307543c7f955041d7048a52 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000415667
0x82f1cd26f225b5855ddee549c190dd5230a311756274b1279f48d7875cbb8750Withdraw92209782021-07-17 0:14:55139 days 13 hrs ago0xa75f1aaea1d18bf81307543c7f955041d7048a52 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000296905
0x0ca75dc058ea57277ea85e963eb24a07c4f2f1aa1b37ca38f85dc6d4f66a6134Withdraw92057992021-07-16 11:35:58140 days 1 hr ago0xcdd0550d713b06411c7f7578ed4e41a77189f4a7 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000296965
0x693d327562250f9e8c785f7bf57d594595b10fb4f48301b8a78ff631620b9a48Stake87514172021-06-30 15:34:03155 days 21 hrs ago0x0307162122447b1762c2723f974b9214950fb826 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135735
0x3cb0ba6c3bd44ea0088d85091ae24b2f6b1dff49ee37a5803240c25141f56a1bStake87012282021-06-28 21:24:01157 days 16 hrs ago0x008149bf11b900366ec59fe0036ad1a18571bfdc IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135855
0x3349c53d13ef84a135ae9a5fc46b3a754ec703fe7bc2f42d61ab93fc98b53420Stake85835812021-06-24 18:59:00161 days 18 hrs ago0x0307162122447b1762c2723f974b9214950fb826 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
0x6b05a0151b13996840f4d2166f835f1868ac473b25527169f6260dacd5520543Stake85835072021-06-24 18:55:18161 days 18 hrs ago0x0307162122447b1762c2723f974b9214950fb826 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135735
0x777ae1974d247a5afb08de2536175c98a93194c4ace102dc0c3ada6833e4364eStake85834402021-06-24 18:51:57161 days 18 hrs ago0x0307162122447b1762c2723f974b9214950fb826 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
0x539c15023291bb12fc5a0e8a86f11ff30f00532fee31faa9aee60301960f7f96Stake85834192021-06-24 18:50:54161 days 18 hrs ago0x0307162122447b1762c2723f974b9214950fb826 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000217272
0xf6574eb52b8e84d0b12edf6d2415a874670e69f507c41cf7aaa7028844a627cdStake85834092021-06-24 18:50:24161 days 18 hrs ago0x0307162122447b1762c2723f974b9214950fb826 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
0x1e446f37c50da2207fa2f6545b33ca24c81b05fa7b0fd90c513795c11f5f2554Stake85833952021-06-24 18:49:42161 days 18 hrs ago0x0307162122447b1762c2723f974b9214950fb826 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
0x346d6971ff7672baaded5d3ca6254455589202d599ec2b804338f7f396aad355Stake85598482021-06-23 23:09:41162 days 14 hrs ago0xda217b4e57e627aebadd2fcccf4415d967763974 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
0xbb96f0bc8b0d58631720a0a6b19eda2b2d5a5867d8fffc96738643b79368a95eStake85342122021-06-23 1:42:28163 days 11 hrs ago0xa95356ab17fa2107081c939c309f4a3827ef8f38 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
0x125d9ec31868494a13de1f14fa47101fa8cc71985a9c639e4da8987bae885fa4Stake85151212021-06-22 9:39:24164 days 3 hrs ago0x5d2cd7d81479b1ad89bb4e265c5a142e3aefa9cb IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135855
0xaac278a5b0062fccef52999de198116d0cde481fe7a6ba571dab8f57b3915549Stake85068212021-06-22 2:42:25164 days 10 hrs ago0xa95356ab17fa2107081c939c309f4a3827ef8f38 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
0xa0c8a1da86f8b0d558a2be57383d7d092ea19e47ee5ef2ca13a020b4cac7e03eStake84869722021-06-21 10:05:28165 days 3 hrs ago0x197365a948e8f7731e942a71258c05a93ccbd0a0 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135855
0x2a3087124ef7f3681e818be629bd6f26f95a9f7a0f71d8dc8a2d3a7e1d4cab28Stake84869652021-06-21 10:05:07165 days 3 hrs ago0x197365a948e8f7731e942a71258c05a93ccbd0a0 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135855
0x411063d48bf8ebba755764ecc02625dd34d424b3e66dc07d54aa3910e95e9b61Stake84490272021-06-20 2:26:07166 days 11 hrs ago0xa95356ab17fa2107081c939c309f4a3827ef8f38 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
0x21b29aa71403010627914fd68e2cc9780ef4cc6ee392a23b75bb09388796b8c7Stake83641462021-06-17 3:03:53169 days 10 hrs ago0x07a1b4b266e73ea1ad88a9d1ac0b8718890f7e99 IN  0x042ef08ae39d2493ebf3864555f1157445fad6a60 BNB0.000135795
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DogeDAOStaking

Compiler Version
v0.6.2+commit.bacdbe57

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 5 : DogeDAOStaking.sol
pragma solidity ^0.6.0;

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

contract DogeDAOStaking {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    mapping (address => uint256) private _stakes;

    string public name;
    address  public tokenAddress;
    address  public rewardTokenAddress;
    address  public owner;
    uint public stakingStarts;
    uint public stakingEnds;
    uint public withdrawStarts;
    uint public withdrawEnds;
    uint256 public stakedTotal;
    uint256 public stakingCap;
    uint256 public totalReward;
    uint256 public earlyWithdrawReward;
    uint256 public rewardBalance;
    uint256 public stakedBalance;

    IERC20 public ERC20Interface;
    event Staked(address indexed token, address indexed staker_, uint256 requestedAmount_, uint256 stakedAmount_);
    event PaidOut(address indexed token, address indexed rewardToken, address indexed staker_, uint256 amount_, uint256 reward_);

    /**
     */
    constructor (string memory name_,
        address tokenAddress_,
        address rewardTokenAddress_,
        uint stakingStarts_,
        uint stakingEnds_,
        uint withdrawStarts_,
        uint withdrawEnds_,
        uint256 stakingCap_) public {
        owner = msg.sender;
        name = name_;
        require(tokenAddress_ != address(0), "DogeDAOStaking: 0 address");
        tokenAddress = tokenAddress_;

        require(rewardTokenAddress_ != address(0), "DogeDAOStaking: 0 reward address");
        rewardTokenAddress = rewardTokenAddress_;

        require(stakingStarts_ > 0, "DogeDAOStaking: zero staking start time");
        if (stakingStarts_ < now) {
            stakingStarts = now;
        } else {
            stakingStarts = stakingStarts_;
        }

        require(stakingEnds_ > stakingStarts, "DogeDAOStaking: staking end must be after staking starts");
        stakingEnds = stakingEnds_;

        require(withdrawStarts_ >= stakingEnds, "DogeDAOStaking: withdrawStarts must be after staking ends");
        withdrawStarts = withdrawStarts_;

        require(withdrawEnds_ > withdrawStarts, "DogeDAOStaking: withdrawEnds must be after withdraw starts");
        withdrawEnds = withdrawEnds_;

        require(stakingCap_ > 0, "DogeDAOStaking: stakingCap must be positive");
        stakingCap = stakingCap_;
    }

    function addReward(uint256 rewardAmount, uint256 withdrawableAmount)
    public
    _before(withdrawStarts)
    returns (bool) {
        require(rewardAmount > 0, "DogeDAOStaking: reward must be positive");
        require(withdrawableAmount >= 0, "DogeDAOStaking: withdrawable amount cannot be negative");
        require(withdrawableAmount <= rewardAmount, "DogeDAOStaking: withdrawable amount must be less than or equal to the reward amount");
        address from = msg.sender;
        if (!_payMe(from, rewardAmount, rewardTokenAddress)) {
            return false;
        }

        totalReward = totalReward.add(rewardAmount);
        rewardBalance = totalReward;
        earlyWithdrawReward = earlyWithdrawReward.add(withdrawableAmount);
        return true;
    }

    function addMarginalReward(uint256 amount) public _before(withdrawStarts) {

    }

    function stakeOf(address account) public view returns (uint256) {
        return _stakes[account];
    }

    /**
    * Requirements:
    * - `amount` Amount to be staked
    */
    function stake(uint256 amount)
    public
    _positive(amount)
    _realAddress(msg.sender)
    returns (bool) {
        address from = msg.sender;
        return _stake(from, amount);
    }

    function withdraw(uint256 amount)
    public
    _after(withdrawStarts)
    _positive(amount)
    _realAddress(msg.sender)
    returns (bool) {
        address from = msg.sender;
        require(amount <= _stakes[from], "DogeDAOStaking: not enough balance");
        if (now < withdrawEnds) {
            return _withdrawEarly(from, amount);
        } else {
            return _withdrawAfterClose(from, amount);
        }
    }

    function _withdrawEarly(address from, uint256 amount)
    private
    _realAddress(from)
    returns (bool) {
        // This is the formula to calculate reward:
        // r = (earlyWithdrawReward / stakedTotal) * (now - stakingEnds) / (withdrawEnds - stakingEnds)
        // w = (1+r) * a
        uint256 denom = (withdrawEnds.sub(stakingEnds)).mul(stakingCap);
        uint256 reward = (
        ( (now.sub(stakingEnds)).mul(earlyWithdrawReward) ).mul(amount)
        ).div(denom);
        rewardBalance = rewardBalance.sub(reward);
        stakedBalance = stakedBalance.sub(amount);
        _stakes[from] = _stakes[from].sub(amount);
        bool principalPaid = _payDirect(from, amount, tokenAddress);
        bool rewardPaid = _payDirect(from, reward, rewardTokenAddress);
        require(principalPaid && rewardPaid, "DogeDAOStaking: error paying");
        emit PaidOut(tokenAddress, rewardTokenAddress, from, amount, reward);
        return true;
    }

    function _withdrawAfterClose(address from, uint256 amount)
    private
    _realAddress(from)
    returns (bool) {
        uint256 reward = (rewardBalance.mul(amount)).div(stakedBalance);
        _stakes[from] = _stakes[from].sub(amount);
        bool principalPaid = _payDirect(from, amount, tokenAddress);
        bool rewardPaid = _payDirect(from, reward, rewardTokenAddress);
        require(principalPaid && rewardPaid, "DogeDAOStaking: error paying");
        emit PaidOut(tokenAddress, rewardTokenAddress, from, amount, reward);
        return true;
    }

    function _stake(address staker, uint256 amount)
    private
    _after(stakingStarts)
    _before(stakingEnds)
    _positive(amount)
    returns (bool) {
        // check the remaining amount to be staked
        uint256 remaining = amount;
        if (remaining > (stakingCap.sub(stakedBalance))) {
            remaining = stakingCap.sub(stakedBalance);
        }
        // These requires are not necessary, because it will never happen, but won't hurt to double check
        // this is because stakedTotal and stakedBalance are only modified in this method during the staking period
        require(remaining > 0, "DogeDAOStaking: Staking cap is filled");
        require((remaining + stakedTotal) <= stakingCap, "DogeDAOStaking: this will increase staking amount pass the cap");
        if (!_payMe(staker, remaining, tokenAddress)) {
            return false;
        }
        emit Staked(tokenAddress, staker, amount, remaining);

        // Transfer is completed
        stakedBalance = stakedBalance.add(remaining);
        stakedTotal = stakedTotal.add(remaining);
        _stakes[staker] = _stakes[staker].add(remaining);
        return true;
    }

    function _payMe(address payer, uint256 amount, address token)
    private
    returns (bool) {
        return _payTo(payer, address(this), amount, token);
    }

    function _payTo(address allower, address receiver, uint256 amount, address token)
    private
    returns (bool) {
        // Request to transfer amount from the contract to receiver.
        // contract does not own the funds, so the allower must have added allowance to the contract
        // Allower is the original owner.
        ERC20Interface = IERC20(token);
        ERC20Interface.safeTransferFrom(allower, receiver, amount);
        return true;
    }

    function _payDirect(address to, uint256 amount, address token)
    private
    returns (bool) {
        if (amount == 0) {
            return true;
        }
        ERC20Interface = IERC20(token);
        ERC20Interface.safeTransfer(to, amount);
        return true;
    }

    function setStakingPeriod(
        uint stakingStarts_,
        uint stakingEnds_,
        uint withdrawStarts_,
        uint withdrawEnds_
    )
    public
    _owner(msg.sender)
    returns (bool) {
        stakingStarts = stakingStarts_;
        stakingEnds = stakingEnds_;
        withdrawStarts = withdrawStarts_;
        withdrawEnds = withdrawEnds_;
        return true;
    }

    function emergencyWithdraw(uint256 rewardAmount, uint256 stakeAmount )
    public
    _owner(msg.sender)
    returns (bool) {
        bool principalPaid = _payDirect(owner, stakeAmount, tokenAddress);
        bool rewardPaid = _payDirect(owner, rewardAmount, rewardTokenAddress);
        require(principalPaid && rewardPaid, "DogeDAOStaking: error paying");
        emit PaidOut(tokenAddress, rewardTokenAddress, owner, stakeAmount, rewardAmount);
        return true;
    }

    modifier _realAddress(address addr) {
        require(addr != address(0), "DogeDAOStaking: zero address");
        _;
    }

    modifier _positive(uint256 amount) {
        require(amount >= 0, "DogeDAOStaking: negative amount");
        _;
    }

    modifier _after(uint eventTime) {
        require(now >= eventTime, "DogeDAOStaking: bad timing for the request");
        _;
    }

    modifier _before(uint eventTime) {
        require(now < eventTime, "DogeDAOStaking: bad timing for the request");
        _;
    }

    modifier _owner(address addr) {
        require(owner == addr, "DogeDAOStaking: not allowed to perform this action");
        _;
    }
}

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

pragma solidity ^0.6.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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

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

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, 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;

/**
 * @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;

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;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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": false,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"address","name":"tokenAddress_","type":"address"},{"internalType":"address","name":"rewardTokenAddress_","type":"address"},{"internalType":"uint256","name":"stakingStarts_","type":"uint256"},{"internalType":"uint256","name":"stakingEnds_","type":"uint256"},{"internalType":"uint256","name":"withdrawStarts_","type":"uint256"},{"internalType":"uint256","name":"withdrawEnds_","type":"uint256"},{"internalType":"uint256","name":"stakingCap_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":true,"internalType":"address","name":"staker_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward_","type":"uint256"}],"name":"PaidOut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"staker_","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestedAmount_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakedAmount_","type":"uint256"}],"name":"Staked","type":"event"},{"inputs":[],"name":"ERC20Interface","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addMarginalReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawableAmount","type":"uint256"}],"name":"addReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earlyWithdrawReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"stakeAmount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakingStarts_","type":"uint256"},{"internalType":"uint256","name":"stakingEnds_","type":"uint256"},{"internalType":"uint256","name":"withdrawStarts_","type":"uint256"},{"internalType":"uint256","name":"withdrawEnds_","type":"uint256"}],"name":"setStakingPeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stakeOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingEnds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingStarts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEnds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawStarts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162002ea938038062002ea983398181016040526101008110156200003857600080fd5b81019080805160405193929190846401000000008211156200005957600080fd5b838201915060208201858111156200007057600080fd5b82518660018202830111640100000000821117156200008e57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c4578082015181840152602081019050620000a7565b50505050905090810190601f168015620000f25780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555087600190805190602001906200019b92919062000579565b50600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16141562000240576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f446f676544414f5374616b696e673a203020616464726573730000000000000081525060200191505060405180910390fd5b86600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141562000325576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f446f676544414f5374616b696e673a203020726577617264206164647265737381525060200191505060405180910390fd5b85600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008511620003c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018062002dac6027913960400191505060405180910390fd5b42851015620003d75742600581905550620003df565b846005819055505b60055484116200043b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018062002e716038913960400191505060405180910390fd5b836006819055506006548310156200049f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603981526020018062002e386039913960400191505060405180910390fd5b82600781905550600754821162000502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a81526020018062002dd3603a913960400191505060405180910390fd5b816008819055506000811162000564576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018062002e0d602b913960400191505060405180910390fd5b80600a81905550505050505050505062000628565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620005bc57805160ff1916838001178555620005ed565b82800160010185558215620005ed579182015b82811115620005ec578251825591602001919060010190620005cf565b5b509050620005fc919062000600565b5090565b6200062591905b808211156200062157600081600090555060010162000607565b5090565b90565b61277480620006386000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80636d68c7d4116100b8578063a694fc3a1161007c578063a694fc3a14610512578063aa5c3ab414610558578063b410e2a114610576578063cc4e813214610594578063d66692a7146105f8578063eacebf611461061657610142565b80636d68c7d4146103f2578063750142e61461041057806375c93bb91461042e5780638da5cb5b1461047e5780639d76ea58146104c857610142565b80632853c5421161010a5780632853c542146102cc5780632e1a7d4d146102fa5780633f7fd60a14610340578063426233601461035e57806344c370d3146103b65780635b9f0016146103d457610142565b806306fdde0314610147578063125f9e33146101ca5780631bbc4b83146102145780631f276b6e1461025e57806321b13cdf146102ae575b600080fd5b61014f610634565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561018f578082015181840152602081019050610174565b50505050905090810190601f1680156101bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d26106d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61021c6106f8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102946004803603604081101561027457600080fd5b81019080803590602001909291908035906020019092919050505061071e565b604051808215151515815260200191505060405180910390f35b6102b66109e0565b6040518082815260200191505060405180910390f35b6102f8600480360360208110156102e257600080fd5b81019080803590602001909291905050506109e6565b005b6103266004803603602081101561031057600080fd5b8101908080359060200190929190505050610a45565b604051808215151515815260200191505060405180910390f35b610348610c8d565b6040518082815260200191505060405180910390f35b6103a06004803603602081101561037457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c93565b6040518082815260200191505060405180910390f35b6103be610cdb565b6040518082815260200191505060405180910390f35b6103dc610ce1565b6040518082815260200191505060405180910390f35b6103fa610ce7565b6040518082815260200191505060405180910390f35b610418610ced565b6040518082815260200191505060405180910390f35b6104646004803603604081101561044457600080fd5b810190808035906020019092919080359060200190929190505050610cf3565b604051808215151515815260200191505060405180910390f35b610486610ee8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104d0610f0e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053e6004803603602081101561052857600080fd5b8101908080359060200190929190505050610f34565b604051808215151515815260200191505060405180910390f35b61056061106b565b6040518082815260200191505060405180910390f35b61057e611071565b6040518082815260200191505060405180910390f35b6105de600480360360808110156105aa57600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190505050611077565b604051808215151515815260200191505060405180910390f35b610600611149565b6040518082815260200191505060405180910390f35b61061e61114f565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106ca5780601f1061069f576101008083540402835291602001916106ca565b820191906000526020600020905b8154815290600101906020018083116106ad57829003601f168201915b505050505081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000338073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806126c16032913960400191505060405180910390fd5b6000610818600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611155565b9050600061086b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611155565b90508180156108775750805b6108e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f676544414f5374616b696e673a206572726f7220706179696e670000000081525060200191505060405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0fd12da3890315fa38b862dc2fff7f24c95981f6508cc2be090640de791b671e888a604051808381526020018281526020019250505060405180910390a46001935050505092915050565b60075481565b600754804210610a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125f4602a913960400191505060405180910390fd5b5050565b600060075480421015610aa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125f4602a913960400191505060405180910390fd5b826000811015610b1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f446f676544414f5374616b696e673a206e6567617469766520616d6f756e740081525060200191505060405180910390fd5b33600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610bbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f676544414f5374616b696e673a207a65726f20616464726573730000000081525060200191505060405180910390fd5b60003390506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054861115610c5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061271d6022913960400191505060405180910390fd5b600854421015610c7757610c6f8187611202565b945050610c85565b610c8181876115a6565b9450505b505050919050565b600c5481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600a5481565b600e5481565b60055481565b600b5481565b6000600754804210610d50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125f4602a913960400191505060405180910390fd5b60008411610da9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061261e6027913960400191505060405180910390fd5b6000831015610e03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061266a6036913960400191505060405180910390fd5b83831115610e5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260538152602001806125a16053913960600191505060405180910390fd5b6000339050610e8e8186600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166118c0565b610e9c576000925050610ee1565b610eb185600b546118d790919063ffffffff16565b600b81905550600b54600d81905550610ed584600c546118d790919063ffffffff16565b600c8190555060019250505b5092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000816000811015610fae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f446f676544414f5374616b696e673a206e6567617469766520616d6f756e740081525060200191505060405180910390fd5b33600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611052576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f676544414f5374616b696e673a207a65726f20616464726573730000000081525060200191505060405180910390fd5b6000339050611061818661195f565b9350505050919050565b600d5481565b60065481565b6000338073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611120576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806126c16032913960400191505060405180910390fd5b856005819055508460068190555083600781905550826008819055506001915050949350505050565b60095481565b60085481565b60008083141561116857600190506111fb565b81600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506111f68484600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d279092919063ffffffff16565b600190505b9392505050565b600082600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156112a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f676544414f5374616b696e673a207a65726f20616464726573730000000081525060200191505060405180910390fd5b60006112d5600a546112c7600654600854611ddf90919063ffffffff16565b611e2990919063ffffffff16565b90506000611326826113188761130a600c546112fc60065442611ddf90919063ffffffff16565b611e2990919063ffffffff16565b611e2990919063ffffffff16565b611eaf90919063ffffffff16565b905061133d81600d54611ddf90919063ffffffff16565b600d8190555061135885600e54611ddf90919063ffffffff16565b600e819055506113af856000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ddf90919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060006114208787600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611155565b905060006114518884600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611155565b905081801561145d5750805b6114cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f676544414f5374616b696e673a206572726f7220706179696e670000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0fd12da3890315fa38b862dc2fff7f24c95981f6508cc2be090640de791b671e8a87604051808381526020018281526020019250505060405180910390a460019550505050505092915050565b600082600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561164c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f676544414f5374616b696e673a207a65726f20616464726573730000000081525060200191505060405180910390fd5b6000611677600e5461166986600d54611e2990919063ffffffff16565b611eaf90919063ffffffff16565b90506116ca846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ddf90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600061173b8686600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611155565b9050600061176c8784600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611155565b90508180156117785750805b6117ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f676544414f5374616b696e673a206572726f7220706179696e670000000081525060200191505060405180910390fd5b8673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0fd12da3890315fa38b862dc2fff7f24c95981f6508cc2be090640de791b671e8987604051808381526020018281526020019250505060405180910390a4600194505050505092915050565b60006118ce84308585611ef9565b90509392505050565b600080828401905083811015611955576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000600554804210156119bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125f4602a913960400191505060405180910390fd5b600654804210611a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125f4602a913960400191505060405180910390fd5b836000811015611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f446f676544414f5374616b696e673a206e6567617469766520616d6f756e740081525060200191505060405180910390fd5b6000859050611aac600e54600a54611ddf90919063ffffffff16565b811115611acd57611aca600e54600a54611ddf90919063ffffffff16565b90505b60008111611b26576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126456025913960400191505060405180910390fd5b600a5460095482011115611b85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180612563603e913960400191505060405180910390fd5b611bb28782600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166118c0565b611bc0576000945050611d1e565b8673ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f6c86f3fd5118b3aa8bb4f389a617046de0a3d3d477de1a1673d227f802f616dc8884604051808381526020018281526020019250505060405180910390a3611c6481600e546118d790919063ffffffff16565b600e81905550611c7f816009546118d790919063ffffffff16565b600981905550611cd6816000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118d790919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060019450505b50505092915050565b611dda8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611f97565b505050565b6000611e2183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612086565b905092915050565b600080831415611e3c5760009050611ea9565b6000828402905082848281611e4d57fe5b0414611ea4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806126a06021913960400191505060405180910390fd5b809150505b92915050565b6000611ef183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612146565b905092915050565b600081600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611f8b858585600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661220c909392919063ffffffff16565b60019050949350505050565b6060611ff9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166122f99092919063ffffffff16565b90506000815111156120815780806020019051602081101561201a57600080fd5b8101908080519060200190929190505050612080576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806126f3602a913960400191505060405180910390fd5b5b505050565b6000838311158290612133576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120f85780820151818401526020810190506120dd565b50505050905090810190601f1680156121255780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080831182906121f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156121b757808201518184015260208101905061219c565b50505050905090810190601f1680156121e45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816121fe57fe5b049050809150509392505050565b6122f3846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611f97565b50505050565b60606123088484600085612311565b90509392505050565b606061231c85612517565b61238e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106123de57805182526020820191506020810190506020830392506123bb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612440576040519150601f19603f3d011682016040523d82523d6000602084013e612445565b606091505b5091509150811561245a57809250505061250f565b60008151111561246d5780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124d45780820151818401526020810190506124b9565b50505050905090810190601f1680156125015780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b949350505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561255957506000801b8214155b9250505091905056fe446f676544414f5374616b696e673a20746869732077696c6c20696e637265617365207374616b696e6720616d6f756e7420706173732074686520636170446f676544414f5374616b696e673a20776974686472617761626c6520616d6f756e74206d757374206265206c657373207468616e206f7220657175616c20746f207468652072657761726420616d6f756e74446f676544414f5374616b696e673a206261642074696d696e6720666f72207468652072657175657374446f676544414f5374616b696e673a20726577617264206d75737420626520706f736974697665446f676544414f5374616b696e673a205374616b696e67206361702069732066696c6c6564446f676544414f5374616b696e673a20776974686472617761626c6520616d6f756e742063616e6e6f74206265206e65676174697665536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77446f676544414f5374616b696e673a206e6f7420616c6c6f77656420746f20706572666f726d207468697320616374696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564446f676544414f5374616b696e673a206e6f7420656e6f7567682062616c616e6365a264697066735822122010a8da4c3ac481385ae9a51080014138a048537e29bc8c8ee108ff3f74debb0b64736f6c63430006020033446f676544414f5374616b696e673a207a65726f207374616b696e672073746172742074696d65446f676544414f5374616b696e673a207769746864726177456e6473206d75737420626520616674657220776974686472617720737461727473446f676544414f5374616b696e673a207374616b696e67436170206d75737420626520706f736974697665446f676544414f5374616b696e673a207769746864726177537461727473206d757374206265206166746572207374616b696e6720656e6473446f676544414f5374616b696e673a207374616b696e6720656e64206d757374206265206166746572207374616b696e6720737461727473000000000000000000000000000000000000000000000000000000000000010000000000000000000000000022b55c72d6273177594dbb65dc670f42e113d859000000000000000000000000c0cfb69cf3470382e89c145b608626c42132c5450000000000000000000000000000000000000000000000000000000060b04ea00000000000000000000000000000000000000000000000000000000060eba2200000000000000000000000000000000000000000000000000000000060eba220000000000000000000000000000000000000000000000000000000006126f5a000000000000000000000000000000000000000000000130ee8e717904440000000000000000000000000000000000000000000000000000000000000000000174d41525320446f676544414f204c50205374616b696e67000000000000000000

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

000000000000000000000000000000000000000000000000000000000000010000000000000000000000000022b55c72d6273177594dbb65dc670f42e113d859000000000000000000000000c0cfb69cf3470382e89c145b608626c42132c5450000000000000000000000000000000000000000000000000000000060b04ea00000000000000000000000000000000000000000000000000000000060eba2200000000000000000000000000000000000000000000000000000000060eba220000000000000000000000000000000000000000000000000000000006126f5a000000000000000000000000000000000000000000000130ee8e717904440000000000000000000000000000000000000000000000000000000000000000000174d41525320446f676544414f204c50205374616b696e67000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): MARS DogeDAO LP Staking
Arg [1] : tokenAddress_ (address): 0x22b55c72d6273177594dbb65dc670f42e113d859
Arg [2] : rewardTokenAddress_ (address): 0xc0cfb69cf3470382e89c145b608626c42132c545
Arg [3] : stakingStarts_ (uint256): 1622167200
Arg [4] : stakingEnds_ (uint256): 1626055200
Arg [5] : withdrawStarts_ (uint256): 1626055200
Arg [6] : withdrawEnds_ (uint256): 1629943200
Arg [7] : stakingCap_ (uint256): 90000000000000000000000

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 00000000000000000000000022b55c72d6273177594dbb65dc670f42e113d859
Arg [2] : 000000000000000000000000c0cfb69cf3470382e89c145b608626c42132c545
Arg [3] : 0000000000000000000000000000000000000000000000000000000060b04ea0
Arg [4] : 0000000000000000000000000000000000000000000000000000000060eba220
Arg [5] : 0000000000000000000000000000000000000000000000000000000060eba220
Arg [6] : 000000000000000000000000000000000000000000000000000000006126f5a0
Arg [7] : 00000000000000000000000000000000000000000000130ee8e7179044400000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [9] : 4d41525320446f676544414f204c50205374616b696e67000000000000000000


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