ETH Price: $2,008.19 (+6.36%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Get Reward157617322022-10-16 16:00:471231 days ago1665936047IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0009484115.57939749
Get Reward157315022022-10-12 10:41:471236 days ago1665571307IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0011337818.62454933
Get Reward157313412022-10-12 10:09:351236 days ago1665569375IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0010513917.27101011
Withdraw114598982020-12-15 20:41:381901 days ago1608064898IN
0x28e4f9f8...47EdF7eAc
0 ETH0.00297535
Start114331702020-12-11 18:17:311905 days ago1607710651IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0019645443.25
Set Rewards Dura...114331662020-12-11 18:16:541905 days ago1607710614IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0016232954
Withdraw114124982020-12-08 13:48:351909 days ago1607435315IN
0x28e4f9f8...47EdF7eAc
0 ETH0.005555
Stake113612842020-11-30 16:42:211916 days ago1606754541IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0044098550
Withdraw113240632020-11-24 23:36:191922 days ago1606260979IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0022991223
Withdraw113230062020-11-24 19:49:001922 days ago1606247340IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0027996328
Withdraw113192262020-11-24 5:52:481923 days ago1606197168IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0041685349.04907737
Withdraw113115412020-11-23 1:31:231924 days ago1606095083IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0039943847
Get Reward112909112020-11-19 21:25:161927 days ago1605821116IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0015770823
Withdraw112758532020-11-17 13:59:381930 days ago1605621578IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0062871874.00000145
Stake112758442020-11-17 13:58:351930 days ago1605621515IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0066834375.8
Withdraw112669942020-11-16 5:19:481931 days ago1605503988IN
0x28e4f9f8...47EdF7eAc
0 ETH0.001274815.00000145
Withdraw112653142020-11-15 23:00:261931 days ago1605481226IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0020396824
Get Reward112645732020-11-15 20:15:411931 days ago1605471341IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0010973116
Withdraw112640272020-11-15 18:19:441931 days ago1605464384IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0033140239
Start112618112020-11-15 10:15:341932 days ago1605435334IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0010492723.1
Withdraw112588772020-11-14 23:31:011932 days ago1605396661IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0026434877
Withdraw112588292020-11-14 23:21:491932 days ago1605396109IN
0x28e4f9f8...47EdF7eAc
0 ETH0.000446313
Withdraw112519612020-11-13 22:08:271933 days ago1605305307IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0011329233
Withdraw112516242020-11-13 20:52:421933 days ago1605300762IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0017589820.7
Get Reward112515292020-11-13 20:34:001933 days ago1605299640IN
0x28e4f9f8...47EdF7eAc
0 ETH0.0015773823
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x7B8b6594...BE3A6906d
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
StakingRewards

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-10-18
*/

pragma solidity ^0.5.16;


/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

/**
 * @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.
     *
     * _Available since v2.4.0._
     */
    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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
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);
}

/**
 * @dev Optional functions from the ERC20 standard.
 */
contract ERC20Detailed is IERC20 {
    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
     * these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol, uint8 decimals) public {
        _name = name;
        _symbol = symbol;
        _decimals = decimals;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }
}

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * This test is non-exhaustive, and there may be false-negatives: during the
     * execution of a contract's constructor, its address will be reported as
     * not containing 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.
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        // 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 != 0x0 && codehash != accountHash);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @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].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

/**
 * @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 ERC20;` 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));
    }

    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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "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");
        }
    }
}

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 */
contract ReentrancyGuard {
    // counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;

    constructor () internal {
        // The counter starts at one to prevent changing it from zero to a non-zero
        // value, which is a more expensive operation.
        _guardCounter = 1;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

interface IStakingRewards {
    // Views
    function lastRewardPaidTime(address account) external view returns (uint256);

    function lastTimeRewardApplicable() external view returns (uint256);

    function rewardPerToken() external view returns (uint256);

    function earned(address account) external view returns (uint256);

    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    // Mutative

    function stake(uint256 amount) external;

    function withdraw(uint256 amount) external;

    function getReward() external;

    function exit() external;

    function sync() external;
}

// https://docs.synthetix.io/contracts/RewardsDistributionRecipient
contract RewardsDistributionRecipient {
    address public rewardsDistribution;

    function start() external;

    modifier onlyRewardsDistribution() {
        require(msg.sender == rewardsDistribution, "Caller is not RewardsDistribution contract");
        _;
    }
}

// Inheritance
contract StakingRewards is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /* ========== STATE VARIABLES ========== */

    IERC20 public rewardsToken;
    IERC20 public stakingToken;
    uint256 public periodFinish = 0;
    uint256 public periodStart = 0;
    uint256 public rewardRate = 0;
    uint256 public rewardsDuration = 3 weeks;

    uint256 private _remainingAmount;
    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;
    mapping(address => uint256) private _lastRewardPaidTime;

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _rewardsDistribution,
        address _rewardsToken,
        address _stakingToken
    ) public {
        rewardsToken = IERC20(_rewardsToken);
        stakingToken = IERC20(_stakingToken);
        rewardsDistribution = _rewardsDistribution;
    }

    /* ========== VIEWS ========== */

    function totalSupply() external view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) external view returns (uint256) {
        return _balances[account];
    }

    function lastTimeRewardApplicable() public view returns (uint256) {
        return Math.min(block.timestamp, periodFinish);
    }

    function rewardPerToken() public view returns (uint256) {
        if (_totalSupply == 0) {
            return 0;
        }
        return rewardRate.mul(1e18).div(_totalSupply);
    }

    function lastRewardPaidTime(address account) public view returns (uint256) {
        if (periodStart == 0) {
            return 0;
        }
        return Math.max(_lastRewardPaidTime[account], periodStart);
    }

    function earned(address account) public view returns (uint256) {
        uint256 _lastPaidTime = lastRewardPaidTime(account);
        if (_lastPaidTime == 0) {
            return 0;
        }
        return _balances[account].mul(lastTimeRewardApplicable().sub(_lastPaidTime)).mul(rewardPerToken()).div(1e18);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function stake(uint256 amount) external nonReentrant {
        require(amount > 0, "Cannot stake 0");
        _getReward();
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        
        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount) public nonReentrant {
        require(amount > 0, "Cannot withdraw 0");
        _getReward();
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        stakingToken.safeTransfer(msg.sender, amount);
        emit Withdrawn(msg.sender, amount);
    }

    function getReward() public nonReentrant {
        _getReward();
    }

    function _getReward() private {
        uint256 reward = earned(msg.sender);
        _lastRewardPaidTime[msg.sender] = block.timestamp;
        if (reward > 0) {
            rewardsToken.safeTransfer(msg.sender, reward);
            _remainingAmount = _remainingAmount.sub(reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    function exit() external {
        withdraw(_balances[msg.sender]);
        getReward();
    }

    function sync() external {
      uint balance = rewardsToken.balanceOf(address(this));
      require(balance > 0, "Invalid balance");

      rewardRate = rewardRate.mul(balance).div(_remainingAmount);
      _remainingAmount = balance;
      emit Synced();
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function start() external onlyRewardsDistribution {
      uint balance = rewardsToken.balanceOf(address(this));
      require(balance > 0, "Invalid balance");
      rewardRate = balance.div(rewardsDuration);

      periodStart = block.timestamp;
      periodFinish = block.timestamp.add(rewardsDuration);
      _remainingAmount = balance;
      emit Started();
    }

    function setRewardsDuration(uint256 _rewardsDuration) external onlyRewardsDistribution {
        require(
            periodFinish == 0 || block.timestamp > periodFinish,
            "Previous rewards period must be complete before changing the duration for the new period"
        );
        rewardsDuration = _rewardsDuration;
        emit RewardsDurationUpdated(rewardsDuration);
    }

    event Started();
    event Synced();
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);
    event RewardsDurationUpdated(uint256 newDuration);
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[],"name":"Started","type":"event"},{"anonymous":false,"inputs":[],"name":"Synced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lastRewardPaidTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"start","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

0x6080604052600060045560006005556000600655621baf8060075534801561002657600080fd5b506040516111ca3803806111ca8339818101604052606081101561004957600080fd5b508051602082015160409092015160018055600280546001600160a01b039485166001600160a01b031991821617909155600380549285169282169290921790915560008054939092169216919091179055611120806100aa6000396000f3fe608060405234801561001057600080fd5b506004361061012b5760003560e01c806380faa57d116100ad578063d1af0c7d11610071578063d1af0c7d14610271578063e9fad8ee14610279578063ebe2b12b14610281578063eda4e6d614610289578063fff6cae9146102915761012b565b806380faa57d1461021f578063a694fc3a14610227578063be9a655514610244578063cc1a378f1461024c578063cd3daf9d146102695761012b565b80633fc6df6e116100f45780633fc6df6e1461019f57806365d9b827146101c357806370a08231146101e957806372f702f31461020f5780637b0a47ee146102175761012b565b80628cc2621461013057806318160ddd146101685780632e1a7d4d14610170578063386a95251461018f5780633d18b91214610197575b600080fd5b6101566004803603602081101561014657600080fd5b50356001600160a01b0316610299565b60408051918252519081900360200190f35b61015661032e565b61018d6004803603602081101561018657600080fd5b5035610335565b005b61015661047f565b61018d610485565b6101a76104f0565b604080516001600160a01b039092168252519081900360200190f35b610156600480360360208110156101d957600080fd5b50356001600160a01b03166104ff565b610156600480360360208110156101ff57600080fd5b50356001600160a01b0316610540565b6101a761055b565b61015661056a565b610156610570565b61018d6004803603602081101561023d57600080fd5b5035610583565b61018d6106c7565b61018d6004803603602081101561026257600080fd5b5035610831565b610156610900565b6101a7610938565b61018d610947565b61015661096a565b610156610970565b61018d610976565b6000806102a5836104ff565b9050806102b6576000915050610329565b610325670de0b6b3a76400006103196102cd610900565b61030d6102e8866102dc610570565b9063ffffffff610a8216565b6001600160a01b0389166000908152600a60205260409020549063ffffffff610acb16565b9063ffffffff610acb16565b9063ffffffff610b2416565b9150505b919050565b6009545b90565b6001805481019081905581610385576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b61038d610b66565b6009546103a0908363ffffffff610a8216565b600955336000908152600a60205260409020546103c3908363ffffffff610a8216565b336000818152600a60205260409020919091556003546103ef916001600160a01b039091169084610bf7565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2600154811461047b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60075481565b60018054810190819055610497610b66565b60015481146104ed576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b6000546001600160a01b031681565b60006005546000141561051457506000610329565b6001600160a01b0382166000908152600b602052604090205460055461053a9190610c4e565b92915050565b6001600160a01b03166000908152600a602052604090205490565b6003546001600160a01b031681565b60065481565b600061057e42600454610c65565b905090565b60018054810190819055816105d0576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6105d8610b66565b6009546105eb908363ffffffff610c7416565b600955336000908152600a602052604090205461060e908363ffffffff610c7416565b336000818152600a602052604090209190915560035461063b916001600160a01b03909116903085610cce565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2600154811461047b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000546001600160a01b031633146107105760405162461bcd60e51b815260040180806020018281038252602a815260200180611098602a913960400191505060405180910390fd5b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561075b57600080fd5b505afa15801561076f573d6000803e3d6000fd5b505050506040513d602081101561078557600080fd5b50519050806107cd576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b6007546107e190829063ffffffff610b2416565b6006554260058190556007546107fd919063ffffffff610c7416565b60045560088190556040517fd8cea0ecd56872ff072e771658b5682ffe4de16d752947f79597d600ea56f7a990600090a150565b6000546001600160a01b0316331461087a5760405162461bcd60e51b815260040180806020018281038252602a815260200180611098602a913960400191505060405180910390fd5b600454158061088a575060045442115b6108c55760405162461bcd60e51b815260040180806020018281038252605881526020018061101f6058913960600191505060405180910390fd5b60078190556040805182815290517ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39181900360200190a150565b60006009546000141561091557506000610332565b61057e600954610319670de0b6b3a7640000600654610acb90919063ffffffff16565b6002546001600160a01b031681565b336000908152600a602052604090205461096090610335565b610968610485565b565b60045481565b60055481565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156109c157600080fd5b505afa1580156109d5573d6000803e3d6000fd5b505050506040513d60208110156109eb57600080fd5b5051905080610a33576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b610a4e60085461031983600654610acb90919063ffffffff16565b60065560088190556040517f3cf21d43d853d313c15c52435ccb3d7a401cf38f82f7330c800290276ef31d3090600090a150565b6000610ac483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610d2e565b9392505050565b600082610ada5750600061053a565b82820282848281610ae757fe5b0414610ac45760405162461bcd60e51b81526004018080602001828103825260218152602001806110776021913960400191505060405180910390fd5b6000610ac483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610dc5565b6000610b7133610299565b336000908152600b60205260409020429055905080156104ed57600254610ba8906001600160a01b0316338363ffffffff610bf716565b600854610bbb908263ffffffff610a8216565b60085560408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c49908490610e2a565b505050565b600081831015610c5e5781610ac4565b5090919050565b6000818310610c5e5781610ac4565b600082820183811015610ac4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610d28908590610e2a565b50505050565b60008184841115610dbd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d82578181015183820152602001610d6a565b50505050905090810190601f168015610daf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610e145760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610d82578181015183820152602001610d6a565b506000838581610e2057fe5b0495945050505050565b610e3c826001600160a01b0316610fe2565b610e8d576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610ecb5780518252601f199092019160209182019101610eac565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610f2d576040519150601f19603f3d011682016040523d82523d6000602084013e610f32565b606091505b509150915081610f89576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610d2857808060200190516020811015610fa557600080fd5b5051610d285760405162461bcd60e51b815260040180806020018281038252602a8152602001806110c2602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906110165750808214155b94935050505056fe50726576696f7573207265776172647320706572696f64206d75737420626520636f6d706c657465206265666f7265206368616e67696e6720746865206475726174696f6e20666f7220746865206e657720706572696f64536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582089cf64d3f7fda0df791cbd88adf6b01bd8708fdd836349b0820f29f72fdd794e64736f6c634300051000320000000000000000000000007017f11e1f6b1a690da56ad439a16930a1159d9000000000000000000000000096b00208911d72ea9f10c3303ff319427a7884c90000000000000000000000007370034134ca83a6bd809848e3be15bace7348f3

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061012b5760003560e01c806380faa57d116100ad578063d1af0c7d11610071578063d1af0c7d14610271578063e9fad8ee14610279578063ebe2b12b14610281578063eda4e6d614610289578063fff6cae9146102915761012b565b806380faa57d1461021f578063a694fc3a14610227578063be9a655514610244578063cc1a378f1461024c578063cd3daf9d146102695761012b565b80633fc6df6e116100f45780633fc6df6e1461019f57806365d9b827146101c357806370a08231146101e957806372f702f31461020f5780637b0a47ee146102175761012b565b80628cc2621461013057806318160ddd146101685780632e1a7d4d14610170578063386a95251461018f5780633d18b91214610197575b600080fd5b6101566004803603602081101561014657600080fd5b50356001600160a01b0316610299565b60408051918252519081900360200190f35b61015661032e565b61018d6004803603602081101561018657600080fd5b5035610335565b005b61015661047f565b61018d610485565b6101a76104f0565b604080516001600160a01b039092168252519081900360200190f35b610156600480360360208110156101d957600080fd5b50356001600160a01b03166104ff565b610156600480360360208110156101ff57600080fd5b50356001600160a01b0316610540565b6101a761055b565b61015661056a565b610156610570565b61018d6004803603602081101561023d57600080fd5b5035610583565b61018d6106c7565b61018d6004803603602081101561026257600080fd5b5035610831565b610156610900565b6101a7610938565b61018d610947565b61015661096a565b610156610970565b61018d610976565b6000806102a5836104ff565b9050806102b6576000915050610329565b610325670de0b6b3a76400006103196102cd610900565b61030d6102e8866102dc610570565b9063ffffffff610a8216565b6001600160a01b0389166000908152600a60205260409020549063ffffffff610acb16565b9063ffffffff610acb16565b9063ffffffff610b2416565b9150505b919050565b6009545b90565b6001805481019081905581610385576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b61038d610b66565b6009546103a0908363ffffffff610a8216565b600955336000908152600a60205260409020546103c3908363ffffffff610a8216565b336000818152600a60205260409020919091556003546103ef916001600160a01b039091169084610bf7565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2600154811461047b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60075481565b60018054810190819055610497610b66565b60015481146104ed576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b6000546001600160a01b031681565b60006005546000141561051457506000610329565b6001600160a01b0382166000908152600b602052604090205460055461053a9190610c4e565b92915050565b6001600160a01b03166000908152600a602052604090205490565b6003546001600160a01b031681565b60065481565b600061057e42600454610c65565b905090565b60018054810190819055816105d0576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6105d8610b66565b6009546105eb908363ffffffff610c7416565b600955336000908152600a602052604090205461060e908363ffffffff610c7416565b336000818152600a602052604090209190915560035461063b916001600160a01b03909116903085610cce565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2600154811461047b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000546001600160a01b031633146107105760405162461bcd60e51b815260040180806020018281038252602a815260200180611098602a913960400191505060405180910390fd5b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561075b57600080fd5b505afa15801561076f573d6000803e3d6000fd5b505050506040513d602081101561078557600080fd5b50519050806107cd576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b6007546107e190829063ffffffff610b2416565b6006554260058190556007546107fd919063ffffffff610c7416565b60045560088190556040517fd8cea0ecd56872ff072e771658b5682ffe4de16d752947f79597d600ea56f7a990600090a150565b6000546001600160a01b0316331461087a5760405162461bcd60e51b815260040180806020018281038252602a815260200180611098602a913960400191505060405180910390fd5b600454158061088a575060045442115b6108c55760405162461bcd60e51b815260040180806020018281038252605881526020018061101f6058913960600191505060405180910390fd5b60078190556040805182815290517ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39181900360200190a150565b60006009546000141561091557506000610332565b61057e600954610319670de0b6b3a7640000600654610acb90919063ffffffff16565b6002546001600160a01b031681565b336000908152600a602052604090205461096090610335565b610968610485565b565b60045481565b60055481565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156109c157600080fd5b505afa1580156109d5573d6000803e3d6000fd5b505050506040513d60208110156109eb57600080fd5b5051905080610a33576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b610a4e60085461031983600654610acb90919063ffffffff16565b60065560088190556040517f3cf21d43d853d313c15c52435ccb3d7a401cf38f82f7330c800290276ef31d3090600090a150565b6000610ac483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610d2e565b9392505050565b600082610ada5750600061053a565b82820282848281610ae757fe5b0414610ac45760405162461bcd60e51b81526004018080602001828103825260218152602001806110776021913960400191505060405180910390fd5b6000610ac483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610dc5565b6000610b7133610299565b336000908152600b60205260409020429055905080156104ed57600254610ba8906001600160a01b0316338363ffffffff610bf716565b600854610bbb908263ffffffff610a8216565b60085560408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c49908490610e2a565b505050565b600081831015610c5e5781610ac4565b5090919050565b6000818310610c5e5781610ac4565b600082820183811015610ac4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610d28908590610e2a565b50505050565b60008184841115610dbd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d82578181015183820152602001610d6a565b50505050905090810190601f168015610daf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610e145760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610d82578181015183820152602001610d6a565b506000838581610e2057fe5b0495945050505050565b610e3c826001600160a01b0316610fe2565b610e8d576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610ecb5780518252601f199092019160209182019101610eac565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610f2d576040519150601f19603f3d011682016040523d82523d6000602084013e610f32565b606091505b509150915081610f89576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610d2857808060200190516020811015610fa557600080fd5b5051610d285760405162461bcd60e51b815260040180806020018281038252602a8152602001806110c2602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906110165750808214155b94935050505056fe50726576696f7573207265776172647320706572696f64206d75737420626520636f6d706c657465206265666f7265206368616e67696e6720746865206475726174696f6e20666f7220746865206e657720706572696f64536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582089cf64d3f7fda0df791cbd88adf6b01bd8708fdd836349b0820f29f72fdd794e64736f6c63430005100032

Deployed Bytecode Sourcemap

19910:4865:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19910:4865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21705:321;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21705:321:0;-1:-1:-1;;;;;21705:321:0;;:::i;:::-;;;;;;;;;;;;;;;;20922:93;;;:::i;22473:355::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22473:355:0;;:::i;:::-;;20303:40;;;:::i;22836:72::-;;;:::i;19656:34::-;;;:::i;:::-;;;;-1:-1:-1;;;;;19656:34:0;;;;;;;;;;;;;;21478:219;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21478:219:0;-1:-1:-1;;;;;21478:219:0;;:::i;21023:112::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21023:112:0;-1:-1:-1;;;;;21023:112:0;;:::i;20159:26::-;;;:::i;20267:29::-;;;:::i;21143:131::-;;;:::i;22088:377::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22088:377:0;;:::i;23715:375::-;;;:::i;24098:395::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24098:395:0;;:::i;21282:188::-;;;:::i;20126:26::-;;;:::i;23278:97::-;;;:::i;20192:31::-;;;:::i;20230:30::-;;;:::i;23383:268::-;;;:::i;21705:321::-;21759:7;21779:21;21803:27;21822:7;21803:18;:27::i;:::-;21779:51;-1:-1:-1;21845:18:0;21841:59;;21887:1;21880:8;;;;;21841:59;21917:101;22013:4;21917:91;21991:16;:14;:16::i;:::-;21917:69;21940:45;21971:13;21940:26;:24;:26::i;:::-;:30;:45;:30;:45;:::i;:::-;-1:-1:-1;;;;;21917:18:0;;;;;;:9;:18;;;;;;;:69;:22;:69;:::i;:::-;:73;:91;:73;:91;:::i;:::-;:95;:101;:95;:101;:::i;:::-;21910:108;;;21705:321;;;;:::o;20922:93::-;20995:12;;20922:93;;:::o;22473:355::-;18676:1;18659:18;;;;;;;;22546:10;22538:40;;;;;-1:-1:-1;;;22538:40:0;;;;;;;;;;;;-1:-1:-1;;;22538:40:0;;;;;;;;;;;;;;;22589:12;:10;:12::i;:::-;22627;;:24;;22644:6;22627:24;:16;:24;:::i;:::-;22612:12;:39;22696:10;22686:21;;;;:9;:21;;;;;;:33;;22712:6;22686:33;:25;:33;:::i;:::-;22672:10;22662:21;;;;:9;:21;;;;;:57;;;;22730:12;;:45;;-1:-1:-1;;;;;22730:12:0;;;;22768:6;22730:25;:45::i;:::-;22791:29;;;;;;;;22801:10;;22791:29;;;;;;;;;;18771:13;;18755:12;:29;18747:73;;;;;-1:-1:-1;;;18747:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22473:355;;:::o;20303:40::-;;;;:::o;22836:72::-;18676:1;18659:18;;;;;;;;22888:12;:10;:12::i;:::-;18771:13;;18755:12;:29;18747:73;;;;;-1:-1:-1;;;18747:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22836:72;:::o;19656:34::-;;;-1:-1:-1;;;;;19656:34:0;;:::o;21478:219::-;21544:7;21568:11;;21583:1;21568:16;21564:57;;;-1:-1:-1;21608:1:0;21601:8;;21564:57;-1:-1:-1;;;;;21647:28:0;;;;;;:19;:28;;;;;;21677:11;;21638:51;;21647:28;21638:8;:51::i;:::-;21631:58;21478:219;-1:-1:-1;;21478:219:0:o;21023:112::-;-1:-1:-1;;;;;21109:18:0;21082:7;21109:18;;;:9;:18;;;;;;;21023:112::o;20159:26::-;;;-1:-1:-1;;;;;20159:26:0;;:::o;20267:29::-;;;;:::o;21143:131::-;21200:7;21227:39;21236:15;21253:12;;21227:8;:39::i;:::-;21220:46;;21143:131;:::o;22088:377::-;18676:1;18659:18;;;;;;;;22160:10;22152:37;;;;;-1:-1:-1;;;22152:37:0;;;;;;;;;;;;-1:-1:-1;;;22152:37:0;;;;;;;;;;;;;;;22200:12;:10;:12::i;:::-;22238;;:24;;22255:6;22238:24;:16;:24;:::i;:::-;22223:12;:39;22307:10;22297:21;;;;:9;:21;;;;;;:33;;22323:6;22297:33;:25;:33;:::i;:::-;22283:10;22273:21;;;;:9;:21;;;;;:57;;;;22341:12;;:64;;-1:-1:-1;;;;;22341:12:0;;;;22391:4;22398:6;22341:29;:64::i;:::-;22431:26;;;;;;;;22438:10;;22431:26;;;;;;;;;;18771:13;;18755:12;:29;18747:73;;;;;-1:-1:-1;;;18747:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;23715:375;19801:19;;-1:-1:-1;;;;;19801:19:0;19787:10;:33;19779:88;;;;-1:-1:-1;;;19779:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23789:12;;:37;;;-1:-1:-1;;;23789:37:0;;23820:4;23789:37;;;;;;23774:12;;-1:-1:-1;;;;;23789:12:0;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;23789:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23789:37:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23789:37:0;;-1:-1:-1;23843:11:0;23835:39;;;;;-1:-1:-1;;;23835:39:0;;;;;;;;;;;;-1:-1:-1;;;23835:39:0;;;;;;;;;;;;;;;23908:15;;23896:28;;:7;;:28;:11;:28;:::i;:::-;23883:10;:41;23949:15;23935:11;:29;;;24008:15;;23988:36;;23949:15;23988:36;:19;:36;:::i;:::-;23973:12;:51;24033:16;:26;;;24073:9;;;;-1:-1:-1;;24073:9:0;19878:1;23715:375::o;24098:395::-;19801:19;;-1:-1:-1;;;;;19801:19:0;19787:10;:33;19779:88;;;;-1:-1:-1;;;19779:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24218:12;;:17;;:51;;;24257:12;;24239:15;:30;24218:51;24196:189;;;;-1:-1:-1;;;24196:189:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24396:15;:34;;;24446:39;;;;;;;;;;;;;;;;;24098:395;:::o;21282:188::-;21329:7;21353:12;;21369:1;21353:17;21349:58;;;-1:-1:-1;21394:1:0;21387:8;;21349:58;21424:38;21449:12;;21424:20;21439:4;21424:10;;:14;;:20;;;;:::i;20126:26::-;;;-1:-1:-1;;;;;20126:26:0;;:::o;23278:97::-;23333:10;23323:21;;;;:9;:21;;;;;;23314:31;;:8;:31::i;:::-;23356:11;:9;:11::i;:::-;23278:97::o;20192:31::-;;;;:::o;20230:30::-;;;;:::o;23383:268::-;23432:12;;:37;;;-1:-1:-1;;;23432:37:0;;23463:4;23432:37;;;;;;23417:12;;-1:-1:-1;;;;;23432:12:0;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;23432:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23432:37:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23432:37:0;;-1:-1:-1;23486:11:0;23478:39;;;;;-1:-1:-1;;;23478:39:0;;;;;;;;;;;;-1:-1:-1;;;23478:39:0;;;;;;;;;;;;;;;23541:45;23569:16;;23541:23;23556:7;23541:10;;:14;;:23;;;;:::i;:45::-;23528:10;:58;23595:16;:26;;;23635:8;;;;-1:-1:-1;;23635:8:0;23383:268;:::o;2090:136::-;2148:7;2175:43;2179:1;2182;2175:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;2168:50;2090:136;-1:-1:-1;;;2090:136:0:o;3006:471::-;3064:7;3309:6;3305:47;;-1:-1:-1;3339:1:0;3332:8;;3305:47;3376:5;;;3380:1;3376;:5;:1;3400:5;;;;;:10;3392:56;;;;-1:-1:-1;;;3392:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3945:132;4003:7;4030:39;4034:1;4037;4030:39;;;;;;;;;;;;;;;;;:3;:39::i;22916:354::-;22957:14;22974:18;22981:10;22974:6;:18::i;:::-;23023:10;23003:31;;;;:19;:31;;;;;23037:15;23003:49;;22957:35;-1:-1:-1;23067:10:0;;23063:200;;23094:12;;:45;;-1:-1:-1;;;;;23094:12:0;23120:10;23132:6;23094:45;:25;:45;:::i;:::-;23173:16;;:28;;23194:6;23173:28;:20;:28;:::i;:::-;23154:16;:47;23221:30;;;;;;;;23232:10;;23221:30;;;;;;;;;;22916:354;:::o;14198:176::-;14307:58;;;-1:-1:-1;;;;;14307:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;14307:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;14281:85:0;;14300:5;;14281:18;:85::i;:::-;14198:176;;;:::o;194:107::-;252:7;284:1;279;:6;;:14;;292:1;279:14;;;-1:-1:-1;288:1:0;;194:107;-1:-1:-1;194:107:0:o;377:106::-;435:7;466:1;462;:5;:13;;474:1;462:13;;1634:181;1692:7;1724:5;;;1748:6;;;;1740:46;;;;;-1:-1:-1;;;1740:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;14382:204;14509:68;;;-1:-1:-1;;;;;14509:68:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;14509:68:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;14483:95:0;;14502:5;;14483:18;:95::i;:::-;14382:204;;;;:::o;2563:192::-;2649:7;2685:12;2677:6;;;;2669:29;;;;-1:-1:-1;;;2669:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2669:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2721:5:0;;;2563:192::o;4607:345::-;4693:7;4795:12;4788:5;4780:28;;;;-1:-1:-1;;;4780:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;4780:28:0;;4819:9;4835:1;4831;:5;;;;;;;4607:345;-1:-1:-1;;;;;4607:345:0:o;16237:1114::-;16841:27;16849:5;-1:-1:-1;;;;;16841:25:0;;:27::i;:::-;16833:71;;;;;-1:-1:-1;;;16833:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16978:12;16992:23;17027:5;-1:-1:-1;;;;;17019:19:0;17039:4;17019:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;17019:25:0;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;16977:67:0;;;;17063:7;17055:52;;;;;-1:-1:-1;;;17055:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17124:17;;:21;17120:224;;17266:10;17255:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17255:30:0;17247:85;;;;-1:-1:-1;;;17247:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11131:810;11191:4;11850:20;;11693:66;11890:15;;;;;:42;;;11921:11;11909:8;:23;;11890:42;11882:51;11131:810;-1:-1:-1;;;;11131:810:0:o

Swarm Source

bzzr://89cf64d3f7fda0df791cbd88adf6b01bd8708fdd836349b0820f29f72fdd794e

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.