ETH Price: $3,389.95 (-1.53%)
Gas: 2 Gwei

Contract

0xd8031d053A2e2370C5A510c9a94aFF29565a7365
 
Transaction Hash
Method
Block
From
To
Value
Get Reward185878172023-11-16 23:46:59225 days ago1700178419IN
0xd8031d05...9565a7365
0 ETH0.002445927.10652469
Withdraw185878052023-11-16 23:44:35225 days ago1700178275IN
0xd8031d05...9565a7365
0 ETH0.0029670732.10909025
Exit184892262023-11-03 4:42:47239 days ago1698986567IN
0xd8031d05...9565a7365
0 ETH0.0015651610.75027139
Get Reward180688132023-09-05 7:33:11298 days ago1693899191IN
0xd8031d05...9565a7365
0 ETH0.000760089.3187377
Withdraw180687842023-09-05 7:27:23298 days ago1693898843IN
0xd8031d05...9565a7365
0 ETH0.0013404811.64241047
Withdraw180607222023-09-04 4:26:47299 days ago1693801607IN
0xd8031d05...9565a7365
0 ETH0.001168669.74682182
Get Reward179682612023-08-22 5:47:35312 days ago1692683255IN
0xd8031d05...9565a7365
0 ETH0.0012291312.19005357
Get Reward178250742023-08-02 4:57:59332 days ago1690952279IN
0xd8031d05...9565a7365
0 ETH0.0011699213.97247497
Get Reward178120112023-07-31 9:11:35334 days ago1690794695IN
0xd8031d05...9565a7365
0 ETH0.0014984714.86127001
Stake176714062023-07-11 15:57:11353 days ago1689091031IN
0xd8031d05...9565a7365
0 ETH0.0029655532.87936376
Get Reward176566802023-07-09 14:15:47355 days ago1688912147IN
0xd8031d05...9565a7365
0 ETH0.0018081717.93269922
Get Reward174985462023-06-17 9:10:47378 days ago1686993047IN
0xd8031d05...9565a7365
0 ETH0.0015590115.46167859
Get Reward174070822023-06-04 11:55:47390 days ago1685879747IN
0xd8031d05...9565a7365
0 ETH0.0015908819
Get Reward173334092023-05-25 3:11:23401 days ago1684984283IN
0xd8031d05...9565a7365
0 ETH0.0023619928.89963987
Withdraw172643422023-05-15 9:38:11411 days ago1684143491IN
0xd8031d05...9565a7365
0 ETH0.0049171642.71114899
Get Reward172641082023-05-15 8:50:47411 days ago1684140647IN
0xd8031d05...9565a7365
0 ETH0.0044296643.93161265
Get Reward171309682023-04-26 14:22:23429 days ago1682518943IN
0xd8031d05...9565a7365
0 ETH0.0050340549.92563338
Get Reward170440372023-04-14 7:44:47442 days ago1681458287IN
0xd8031d05...9565a7365
0 ETH0.0027061526.83851469
Stake170421122023-04-14 1:10:47442 days ago1681434647IN
0xd8031d05...9565a7365
0 ETH0.0036739535.83261288
Stake169467252023-03-31 10:54:59455 days ago1680260099IN
0xd8031d05...9565a7365
0 ETH0.0021267620.74512355
Get Reward169466742023-03-31 10:44:47455 days ago1680259487IN
0xd8031d05...9565a7365
0 ETH0.0017887721.3633288
Get Reward169384372023-03-30 6:59:47457 days ago1680159587IN
0xd8031d05...9565a7365
0 ETH0.0027298127.07314515
Get Reward168748432023-03-21 8:30:35466 days ago1679387435IN
0xd8031d05...9565a7365
0 ETH0.0012298812.19746721
Get Reward168683272023-03-20 10:35:35466 days ago1679308535IN
0xd8031d05...9565a7365
0 ETH0.0012038111.93889895
Get Reward168605402023-03-19 8:20:11468 days ago1679214011IN
0xd8031d05...9565a7365
0 ETH0.001169513.96737588
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

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

Contract Name:
StakingRewards

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-04-28
*/

/**
 *Submitted for verification at Etherscan.io on 2022-02-01
*/

// File: contracts/SafeMath.sol

pragma solidity ^0.8.11;

/**
 * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        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-solidity/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) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        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) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}

// File: contracts/StakingRewards.sol

//pragma solidity ^0.8.11;

//import "./ERC20Detailed.sol";
//import "./SafeERC20.sol";
//import "./ReentrancyGuard.sol";

// Inheritance
//import "./IStakingRewards.sol";
//import "./RewardsDistributionRecipient.sol";
//import "./Pausable.sol";


// https://docs.synthetix.io/contracts/source/interfaces/istakingrewards
interface IStakingRewards {
    // Views

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

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

    function getRewardForDuration() external view returns (uint256);

    function lastTimeRewardApplicable() external view returns (uint256);

    function rewardPerToken() external view returns (uint256);

    //function rewardsDistribution() external view returns (address);

    //function rewardsToken() external view returns (address);

    function totalSupply() external view returns (uint256);

    // Mutative

    function exit() external;

    function getReward() external;

    function stake(uint256 amount) external;

    function withdraw(uint256 amount) external;
}



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

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

/**
 * @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.
     *
     * > 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.
 */
abstract 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_)  {
        _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 that 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;
    }
}

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


// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}
// https://docs.synthetix.io/contracts/source/contracts/pausable
abstract contract Pausable is Owned {
    uint public lastPauseTime;
    bool public paused;

    constructor() internal {
        // This contract is abstract, and thus cannot be instantiated directly
        require(owner != address(0), "Owner must be set");
        // Paused will be false, and lastPauseTime will be 0 upon initialisation
    }

    /**
     * @notice Change the paused state of the contract
     * @dev Only the contract owner may call this.
     */
    function setPaused(bool _paused) external onlyOwner {
        // Ensure we're actually changing the state before we do anything
        if (_paused == paused) {
            return;
        }

        // Set our paused state.
        paused = _paused;

        // If applicable, set the last pause time.
        if (paused) {
            lastPauseTime = block.timestamp;
        }

        // Let everyone know that our pause state has changed.
        emit PauseChanged(paused);
    }

    event PauseChanged(bool isPaused);

    modifier notPaused {
        require(!paused, "This action cannot be performed while the contract is paused");
        _;
    }
}

// https://docs.synthetix.io/contracts/source/contracts/rewardsdistributionrecipient
abstract contract RewardsDistributionRecipient is Owned {
    address public rewardsDistribution;

    function notifyRewardAmount(uint256 reward) virtual external;

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

    function setRewardsDistribution(address _rewardsDistribution) external onlyOwner {
        rewardsDistribution = _rewardsDistribution;
    }
}

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the `nonReentrant` modifier
 * available, which can be aplied 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.
 */
abstract contract ReentrancyGuard {
    /// @dev 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");
    }
}


// https://docs.synthetix.io/contracts/source/contracts/stakingrewards
contract StakingRewards is IStakingRewards, RewardsDistributionRecipient, Pausable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

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

    IERC20 public rewardsToken;
    IERC20 public stakingToken;
    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public rewardsDuration = 7 days;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;

    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

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

    uint256 private _guardCounter;

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

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

    /* ========== 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 block.timestamp < periodFinish ? block.timestamp : periodFinish;
    }

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

    function earned(address account) public view returns (uint256) {
        return _balances[account].mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add(rewards[account]);
    }

    function getRewardForDuration() external view returns (uint256) {
        return rewardRate.mul(rewardsDuration);
    }

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

    function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");
        _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 updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");
        _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 updateReward(msg.sender) {
        uint256 reward = rewards[msg.sender];
        if (reward > 0) {
            rewards[msg.sender] = 0;
            rewardsToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

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

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

    function notifyRewardAmount(uint256 reward) override external onlyRewardsDistribution updateReward(address(0)) {
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(rewardsDuration);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(rewardsDuration);
        }

        // Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint balance = rewardsToken.balanceOf(address(this));
        require(rewardRate <= balance.div(rewardsDuration), "Provided reward too high");

        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(rewardsDuration);
        emit RewardAdded(reward);
    }

    // Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner {
        require(tokenAddress != address(stakingToken), "Cannot withdraw the staking token");
        IERC20(tokenAddress).safeTransfer(owner, tokenAmount);
        emit Recovered(tokenAddress, tokenAmount);
    }

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

    /* ========== MODIFIERS ========== */

    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }

    /* ========== EVENTS ========== */

    event RewardAdded(uint256 reward);
    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);
    event Recovered(address token, uint256 amount);
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"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":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPauseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"}],"name":"setRewardsDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e45760003560e01c806372f702f31161010f578063a694fc3a116100a2578063d1af0c7d11610071578063d1af0c7d146103e7578063df136d65146103ff578063e9fad8ee14610408578063ebe2b12b1461041057600080fd5b8063a694fc3a146103b0578063c8f33c91146103c3578063cc1a378f146103cc578063cd3daf9d146103df57600080fd5b80638980f11f116100de5780638980f11f146103615780638b876347146103745780638da5cb5b1461039457806391b4ded9146103a757600080fd5b806372f702f31461033557806379ba5097146103485780637b0a47ee1461035057806380faa57d1461035957600080fd5b80632e1a7d4d116101875780633fc6df6e116101565780633fc6df6e146102b157806353a47bb7146102dc5780635c975abb146102ef57806370a082311461030c57600080fd5b80632e1a7d4d1461027a578063386a95251461028d5780633c6b16ab146102965780633d18b912146102a957600080fd5b806316c38b3c116101c357806316c38b3c1461024457806318160ddd14610257578063197621431461025f5780631c1f78eb1461027257600080fd5b80628cc262146101e95780630700037d1461020f5780631627540c1461022f575b600080fd5b6101fc6101f7366004611419565b610419565b6040519081526020015b60405180910390f35b6101fc61021d366004611419565b600c6020526000908152604090205481565b61024261023d366004611419565b610497565b005b610242610252366004611442565b6104f4565b600d546101fc565b61024261026d366004611419565b610566565b6101fc610590565b61024261028836600461145f565b6105ae565b6101fc60085481565b6102426102a436600461145f565b61074f565b6102426109a6565b6002546102c4906001600160a01b031681565b6040516001600160a01b039091168152602001610206565b6001546102c4906001600160a01b031681565b6004546102fc9060ff1681565b6040519015158152602001610206565b6101fc61031a366004611419565b6001600160a01b03166000908152600e602052604090205490565b6005546102c4906001600160a01b031681565b610242610ae8565b6101fc60075481565b6101fc610bd2565b61024261036f366004611478565b610be9565b6101fc610382366004611419565b600b6020526000908152604090205481565b6000546102c4906001600160a01b031681565b6101fc60035481565b6102426103be36600461145f565b610cb9565b6101fc60095481565b6102426103da36600461145f565b610e72565b6101fc610f4c565b6004546102c49061010090046001600160a01b031681565b6101fc600a5481565b610242610f97565b6101fc60065481565b6001600160a01b0381166000908152600c6020908152604080832054600b909252822054610491919061048b90670de0b6b3a7640000906104859061046690610460610f4c565b90610fba565b6001600160a01b0388166000908152600e602052604090205490611020565b906110a9565b90611106565b92915050565b61049f611165565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906020015b60405180910390a150565b6104fc611165565b60045460ff16151581151514610563576004805460ff191682151590811790915560ff161561052a57426003555b60045460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec5906020016104e9565b50565b61056e611165565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60006105a960085460075461102090919063ffffffff16565b905090565b6001600f60008282546105c191906114b8565b9091555050600f54336105d2610f4c565b600a556105dd610bd2565b6009556001600160a01b03811615610624576105f881610419565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b6000831161066d5760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b60448201526064015b60405180910390fd5b600d5461067a9084610fba565b600d55336000908152600e60205260409020546106979084610fba565b336000818152600e60205260409020919091556005546106c3916001600160a01b0390911690856111d7565b60405183815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250600f54811461074b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610664565b5050565b6002546001600160a01b031633146107bc5760405162461bcd60e51b815260206004820152602a60248201527f43616c6c6572206973206e6f742052657761726473446973747269627574696f6044820152691b8818dbdb9d1c9858dd60b21b6064820152608401610664565b60006107c6610f4c565b600a556107d1610bd2565b6009556001600160a01b03811615610818576107ec81610419565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442106108375760085461082f9083906110a9565b60075561087a565b6006546000906108479042610fba565b905060006108606007548361102090919063ffffffff16565b600854909150610874906104858684611106565b60075550505b600480546040516370a0823160e01b815230928101929092526000916101009091046001600160a01b0316906370a0823190602401602060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f091906114d0565b9050610907600854826110a990919063ffffffff16565b60075411156109585760405162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f206869676800000000000000006044820152606401610664565b42600981905560085461096b9190611106565b6006556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050565b6001600f60008282546109b991906114b8565b9091555050600f54336109ca610f4c565b600a556109d5610bd2565b6009556001600160a01b03811615610a1c576109f081610419565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b336000908152600c60205260409020548015610a9557336000818152600c6020526040812055600454610a5f916101009091046001600160a01b031690836111d7565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5050600f5481146105635760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610664565b6001546001600160a01b03163314610b605760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610664565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60006006544210610be4575060065490565b504290565b610bf1611165565b6005546001600160a01b0390811690831603610c595760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656044820152603760f91b6064820152608401610664565b600054610c73906001600160a01b038481169116836111d7565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910160405180910390a15050565b6001600f6000828254610ccc91906114b8565b9091555050600f5460045460ff1615610d4d5760405162461bcd60e51b815260206004820152603c60248201527f5468697320616374696f6e2063616e6e6f7420626520706572666f726d65642060448201527f7768696c652074686520636f6e747261637420697320706175736564000000006064820152608401610664565b33610d56610f4c565b600a55610d61610bd2565b6009556001600160a01b03811615610da857610d7c81610419565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008311610de95760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606401610664565b600d54610df69084611106565b600d55336000908152600e6020526040902054610e139084611106565b336000818152600e6020526040902091909155600554610e40916001600160a01b0390911690308661123f565b60405183815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020016106f1565b610e7a611165565b6006544211610f175760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e67207468652064757260648201527f6174696f6e20666f7220746865206e657720706572696f640000000000000000608482015260a401610664565b60088190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d3906020016104e9565b6000600d54600003610f5f5750600a5490565b6105a9610f8e600d54610485670de0b6b3a7640000610f88600754610f88600954610460610bd2565b90611020565b600a5490611106565b336000908152600e6020526040902054610fb0906105ae565b610fb86109a6565b565b60008282111561100c5760405162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f7700006044820152606401610664565b600061101883856114e9565b949350505050565b60008260000361103257506000610491565b600061103e8385611500565b90508261104b858361151f565b146110a25760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610664565b9392505050565b60008082116110fa5760405162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f0000000000006044820152606401610664565b6000611018838561151f565b60008061111383856114b8565b9050838110156110a25760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610664565b6000546001600160a01b03163314610fb85760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610664565b6040516001600160a01b03831660248201526044810182905261123a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261127d565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526112779085906323b872dd60e01b90608401611203565b50505050565b6001600160a01b0382163b6112d45760405162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374006044820152606401610664565b600080836001600160a01b0316836040516112ef9190611541565b6000604051808303816000865af19150503d806000811461132c576040519150601f19603f3d011682016040523d82523d6000602084013e611331565b606091505b5091509150816113835760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646044820152606401610664565b805115611277578080602001905181019061139e919061157c565b6112775760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610664565b80356001600160a01b038116811461141457600080fd5b919050565b60006020828403121561142b57600080fd5b6110a2826113fd565b801515811461056357600080fd5b60006020828403121561145457600080fd5b81356110a281611434565b60006020828403121561147157600080fd5b5035919050565b6000806040838503121561148b57600080fd5b611494836113fd565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156114cb576114cb6114a2565b500190565b6000602082840312156114e257600080fd5b5051919050565b6000828210156114fb576114fb6114a2565b500390565b600081600019048311821515161561151a5761151a6114a2565b500290565b60008261153c57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b818110156115625760208186018101518583015201611548565b81811115611571576000828501525b509190910192915050565b60006020828403121561158e57600080fd5b81516110a28161143456fea2646970667358221220a0e4b1772912af459364811a12e0fba15382ec9d21690dda8520411d98ee1d8064736f6c634300080d0033

Deployed Bytecode Sourcemap

18388:6349:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20274:198;;;;;;:::i;:::-;;:::i;:::-;;;529:25:1;;;517:2;502:18;20274:198:0;;;;;;;;18927:42;;;;;;:::i;:::-;;;;;;;;;;;;;;14265:141;;;;;;:::i;:::-;;:::i;:::-;;15564:500;;;;;;:::i;:::-;;:::i;19552:93::-;19625:12;;19552:93;;16674:142;;;;;;:::i;:::-;;:::i;20480:121::-;;;:::i;21050:357::-;;;;;;:::i;:::-;;:::i;18737:39::-;;;;;;21891:1092;;;;;;:::i;:::-;;:::i;21415:307::-;;;:::i;16400:34::-;;;;;-1:-1:-1;;;;;16400:34:0;;;;;;-1:-1:-1;;;;;1283:32:1;;;1265:51;;1253:2;1238:18;16400:34:0;1119:203:1;14034:29:0;;;;;-1:-1:-1;;;;;14034:29:0;;;15150:18;;;;;;;;;;;;1492:14:1;;1485:22;1467:41;;1455:2;1440:18;15150::0;1327:187:1;19653:112:0;;;;;;:::i;:::-;-1:-1:-1;;;;;19739:18:0;19712:7;19739:18;;;:9;:18;;;;;;;19653:112;18630:26;;;;;-1:-1:-1;;;;;18630:26:0;;;14414:271;;;:::i;18701:29::-;;;;;;19773:155;;;:::i;23098:302::-;;;;;;:::i;:::-;;:::i;18863:57::-;;;;;;:::i;:::-;;;;;;;;;;;;;;14007:20;;;;;-1:-1:-1;;;;;14007:20:0;;;15118:25;;;;;;20663:379;;;;;;:::i;:::-;;:::i;18783:29::-;;;;;;23408:360;;;;;;:::i;:::-;;:::i;19936:330::-;;;:::i;18597:26::-;;;;;;;;-1:-1:-1;;;;;18597:26:0;;;18819:35;;;;;;21730:97;;;:::i;18663:31::-;;;;;;20274:198;-1:-1:-1;;;;;20447:16:0;;20328:7;20447:16;;;:7;:16;;;;;;;;;20399:22;:31;;;;;;20355:109;;20447:16;20355:87;;20437:4;;20355:77;;20378:53;;:16;:14;:16::i;:::-;:20;;:53::i;:::-;-1:-1:-1;;;;;20355:18:0;;;;;;:9;:18;;;;;;;:22;:77::i;:::-;:81;;:87::i;:::-;:91;;:109::i;:::-;20348:116;20274:198;-1:-1:-1;;20274:198:0:o;14265:141::-;14723:12;:10;:12::i;:::-;14337:14:::1;:23:::0;;-1:-1:-1;;;;;;14337:23:0::1;-1:-1:-1::0;;;;;14337:23:0;::::1;::::0;;::::1;::::0;;;14376:22:::1;::::0;1265:51:1;;;14376:22:0::1;::::0;1253:2:1;1238:18;14376:22:0::1;;;;;;;;14265:141:::0;:::o;15564:500::-;14723:12;:10;:12::i;:::-;15717:6:::1;::::0;::::1;;15706:17;;::::0;::::1;;15702:56:::0;15740:7:::1;15702:56;15804:6;:16:::0;;-1:-1:-1;;15804:16:0::1;::::0;::::1;;::::0;;::::1;::::0;;;::::1;15889:6:::0;15885:70:::1;;;15928:15;15912:13;:31:::0;15885:70:::1;16049:6;::::0;16036:20:::1;::::0;16049:6:::1;::::0;;::::1;1492:14:1::0;1485:22;1467:41;;16036:20:0::1;::::0;1455:2:1;1440:18;16036:20:0::1;1327:187:1::0;14746:1:0::1;15564:500:::0;:::o;16674:142::-;14723:12;:10;:12::i;:::-;16766:19:::1;:42:::0;;-1:-1:-1;;;;;;16766:42:0::1;-1:-1:-1::0;;;;;16766:42:0;;;::::1;::::0;;;::::1;::::0;;16674:142::o;20480:121::-;20535:7;20562:31;20577:15;;20562:10;;:14;;:31;;;;:::i;:::-;20555:38;;20480:121;:::o;21050:357::-;24211:1;24194:13;;:18;;;;;;;:::i;:::-;;;;-1:-1:-1;;24246:13:0;;21117:10:::1;23894:16;:14;:16::i;:::-;23871:20;:39:::0;23938:26:::1;:24;:26::i;:::-;23921:14;:43:::0;-1:-1:-1;;;;;23979:21:0;::::1;::::0;23975:157:::1;;24036:15;24043:7;24036:6;:15::i;:::-;-1:-1:-1::0;;;;;24017:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;24100:20:::1;::::0;24066:22:::1;:31:::0;;;;;;:54;23975:157:::1;21157:1:::2;21148:6;:10;21140:40;;;::::0;-1:-1:-1;;;21140:40:0;;2467:2:1;21140:40:0::2;::::0;::::2;2449:21:1::0;2506:2;2486:18;;;2479:30;-1:-1:-1;;;2525:18:1;;;2518:47;2582:18;;21140:40:0::2;;;;;;;;;21206:12;::::0;:24:::2;::::0;21223:6;21206:16:::2;:24::i;:::-;21191:12;:39:::0;21275:10:::2;21265:21;::::0;;;:9:::2;:21;::::0;;;;;:33:::2;::::0;21291:6;21265:25:::2;:33::i;:::-;21251:10;21241:21;::::0;;;:9:::2;:21;::::0;;;;:57;;;;21309:12:::2;::::0;:45:::2;::::0;-1:-1:-1;;;;;21309:12:0;;::::2;::::0;21347:6;21309:25:::2;:45::i;:::-;21370:29;::::0;529:25:1;;;21380:10:0::2;::::0;21370:29:::2;::::0;517:2:1;502:18;21370:29:0::2;;;;;;;;24270:1:::1;24306:13:::0;;24290:12;:29;24282:73;;;;-1:-1:-1;;;24282:73:0;;2813:2:1;24282:73:0;;;2795:21:1;2852:2;2832:18;;;2825:30;2891:33;2871:18;;;2864:61;2942:18;;24282:73:0;2611:355:1;24282:73:0;24183:180;21050:357;:::o;21891:1092::-;16580:19;;-1:-1:-1;;;;;16580:19:0;16566:10;:33;16558:88;;;;-1:-1:-1;;;16558:88:0;;3173:2:1;16558:88:0;;;3155:21:1;3212:2;3192:18;;;3185:30;3251:34;3231:18;;;3224:62;-1:-1:-1;;;3302:18:1;;;3295:40;3352:19;;16558:88:0;2971:406:1;16558:88:0;21998:1:::1;23894:16;:14;:16::i;:::-;23871:20;:39:::0;23938:26:::1;:24;:26::i;:::-;23921:14;:43:::0;-1:-1:-1;;;;;23979:21:0;::::1;::::0;23975:157:::1;;24036:15;24043:7;24036:6;:15::i;:::-;-1:-1:-1::0;;;;;24017:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;24100:20:::1;::::0;24066:22:::1;:31:::0;;;;;;:54;23975:157:::1;22036:12:::2;;22017:15;:31;22013:318;;22089:15;::::0;22078:27:::2;::::0;:6;;:10:::2;:27::i;:::-;22065:10;:40:::0;22013:318:::2;;;22158:12;::::0;22138:17:::2;::::0;22158:33:::2;::::0;22175:15:::2;22158:16;:33::i;:::-;22138:53;;22206:16;22225:25;22239:10;;22225:9;:13;;:25;;;;:::i;:::-;22303:15;::::0;22206:44;;-1:-1:-1;22278:41:0::2;::::0;:20:::2;:6:::0;22206:44;22278:10:::2;:20::i;:41::-;22265:10;:54:::0;-1:-1:-1;;22013:318:0::2;22706:12;::::0;;:37:::2;::::0;-1:-1:-1;;;22706:37:0;;22737:4:::2;22706:37:::0;;::::2;1265:51:1::0;;;;22691:12:0::2;::::0;22706::::2;::::0;;::::2;-1:-1:-1::0;;;;;22706:12:0::2;::::0;:22:::2;::::0;1238:18:1;;22706:37:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22691:52;;22776:28;22788:15;;22776:7;:11;;:28;;;;:::i;:::-;22762:10;;:42;;22754:79;;;::::0;-1:-1:-1;;;22754:79:0;;3773:2:1;22754:79:0::2;::::0;::::2;3755:21:1::0;3812:2;3792:18;;;3785:30;3851:26;3831:18;;;3824:54;3895:18;;22754:79:0::2;3571:348:1::0;22754:79:0::2;22863:15;22846:14;:32:::0;;;22924:15:::2;::::0;22904:36:::2;::::0;22863:15;22904:19:::2;:36::i;:::-;22889:12;:51:::0;22956:19:::2;::::0;529:25:1;;;22956:19:0::2;::::0;517:2:1;502:18;22956:19:0::2;;;;;;;22002:981;16657:1:::1;21891:1092:::0;:::o;21415:307::-;24211:1;24194:13;;:18;;;;;;;:::i;:::-;;;;-1:-1:-1;;24246:13:0;;21469:10:::1;23894:16;:14;:16::i;:::-;23871:20;:39:::0;23938:26:::1;:24;:26::i;:::-;23921:14;:43:::0;-1:-1:-1;;;;;23979:21:0;::::1;::::0;23975:157:::1;;24036:15;24043:7;24036:6;:15::i;:::-;-1:-1:-1::0;;;;;24017:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;24100:20:::1;::::0;24066:22:::1;:31:::0;;;;;;:54;23975:157:::1;21517:10:::2;21492:14;21509:19:::0;;;:7:::2;:19;::::0;;;;;21543:10;;21539:176:::2;;21578:10;21592:1;21570:19:::0;;;:7:::2;:19;::::0;;;;:23;21608:12:::2;::::0;:45:::2;::::0;:12:::2;::::0;;::::2;-1:-1:-1::0;;;;;21608:12:0::2;::::0;21646:6;21608:25:::2;:45::i;:::-;21673:30;::::0;529:25:1;;;21684:10:0::2;::::0;21673:30:::2;::::0;517:2:1;502:18;21673:30:0::2;;;;;;;21539:176;21481:241;24270:1:::1;24306:13:::0;;24290:12;:29;24282:73;;;;-1:-1:-1;;;24282:73:0;;2813:2:1;24282:73:0;;;2795:21:1;2852:2;2832:18;;;2825:30;2891:33;2871:18;;;2864:61;2942:18;;24282:73:0;2611:355:1;14414:271:0;14483:14;;-1:-1:-1;;;;;14483:14:0;14469:10;:28;14461:94;;;;-1:-1:-1;;;14461:94:0;;4126:2:1;14461:94:0;;;4108:21:1;4165:2;4145:18;;;4138:30;4204:34;4184:18;;;4177:62;-1:-1:-1;;;4255:18:1;;;4248:51;4316:19;;14461:94:0;3924:417:1;14461:94:0;14584:5;;;14591:14;14571:35;;;-1:-1:-1;;;;;14584:5:0;;;4558:34:1;;14591:14:0;;;;4623:2:1;4608:18;;4601:43;14571:35:0;;4493:18:1;14571:35:0;;;;;;;14625:14;;;;14617:22;;-1:-1:-1;;;;;;14617:22:0;;;-1:-1:-1;;;;;14625:14:0;;14617:22;;;;14650:27;;;14414:271::o;19773:155::-;19830:7;19875:12;;19857:15;:30;:63;;-1:-1:-1;19908:12:0;;;20480:121::o;19857:63::-;-1:-1:-1;19890:15:0;;19773:155::o;23098:302::-;14723:12;:10;:12::i;:::-;23225::::1;::::0;-1:-1:-1;;;;;23225:12:0;;::::1;23201:37:::0;;::::1;::::0;23193:83:::1;;;::::0;-1:-1:-1;;;23193:83:0;;4857:2:1;23193:83:0::1;::::0;::::1;4839:21:1::0;4896:2;4876:18;;;4869:30;4935:34;4915:18;;;4908:62;-1:-1:-1;;;4986:18:1;;;4979:31;5027:19;;23193:83:0::1;4655:397:1::0;23193:83:0::1;23321:5;::::0;23287:53:::1;::::0;-1:-1:-1;;;;;23287:33:0;;::::1;::::0;23321:5:::1;23328:11:::0;23287:33:::1;:53::i;:::-;23356:36;::::0;;-1:-1:-1;;;;;5249:32:1;;5231:51;;5313:2;5298:18;;5291:34;;;23356:36:0::1;::::0;5204:18:1;23356:36:0::1;;;;;;;23098:302:::0;;:::o;20663:379::-;24211:1;24194:13;;:18;;;;;;;:::i;:::-;;;;-1:-1:-1;;24246:13:0;;16153:6:::1;::::0;::::1;;16152:7;16144:80;;;::::0;-1:-1:-1;;;16144:80:0;;5538:2:1;16144:80:0::1;::::0;::::1;5520:21:1::0;5577:2;5557:18;;;5550:30;5616:34;5596:18;;;5589:62;5687:30;5667:18;;;5660:58;5735:19;;16144:80:0::1;5336:424:1::0;16144:80:0::1;20739:10:::2;23894:16;:14;:16::i;:::-;23871:20;:39:::0;23938:26:::2;:24;:26::i;:::-;23921:14;:43:::0;-1:-1:-1;;;;;23979:21:0;::::2;::::0;23975:157:::2;;24036:15;24043:7;24036:6;:15::i;:::-;-1:-1:-1::0;;;;;24017:16:0;::::2;;::::0;;;:7:::2;:16;::::0;;;;;;;:34;;;;24100:20:::2;::::0;24066:22:::2;:31:::0;;;;;;:54;23975:157:::2;20779:1:::3;20770:6;:10;20762:37;;;::::0;-1:-1:-1;;;20762:37:0;;5967:2:1;20762:37:0::3;::::0;::::3;5949:21:1::0;6006:2;5986:18;;;5979:30;-1:-1:-1;;;6025:18:1;;;6018:44;6079:18;;20762:37:0::3;5765:338:1::0;20762:37:0::3;20825:12;::::0;:24:::3;::::0;20842:6;20825:16:::3;:24::i;:::-;20810:12;:39:::0;20894:10:::3;20884:21;::::0;;;:9:::3;:21;::::0;;;;;:33:::3;::::0;20910:6;20884:25:::3;:33::i;:::-;20870:10;20860:21;::::0;;;:9:::3;:21;::::0;;;;:57;;;;20928:12:::3;::::0;:64:::3;::::0;-1:-1:-1;;;;;20928:12:0;;::::3;::::0;20978:4:::3;20985:6:::0;20928:29:::3;:64::i;:::-;21008:26;::::0;529:25:1;;;21015:10:0::3;::::0;21008:26:::3;::::0;517:2:1;502:18;21008:26:0::3;383:177:1::0;23408:360:0;14723:12;:10;:12::i;:::-;23532::::1;;23514:15;:30;23492:168;;;::::0;-1:-1:-1;;;23492:168:0;;6310:2:1;23492:168:0::1;::::0;::::1;6292:21:1::0;6349:2;6329:18;;;6322:30;6388:34;6368:18;;;6361:62;6459:34;6439:18;;;6432:62;6531:26;6510:19;;;6503:55;6575:19;;23492:168:0::1;6108:492:1::0;23492:168:0::1;23671:15;:34:::0;;;23721:39:::1;::::0;529:25:1;;;23721:39:0::1;::::0;517:2:1;502:18;23721:39:0::1;383:177:1::0;19936:330:0;19983:7;20007:12;;20023:1;20007:17;20003:77;;-1:-1:-1;20048:20:0;;;19936:330::o;20003:77::-;20110:148;20153:90;20230:12;;20153:72;20220:4;20153:62;20204:10;;20153:46;20184:14;;20153:26;:24;:26::i;:46::-;:50;;:62::i;:90::-;20110:20;;;:24;:148::i;21730:97::-;21785:10;21775:21;;;;:9;:21;;;;;;21766:31;;:8;:31::i;:::-;21808:11;:9;:11::i;:::-;21730:97::o;1422:184::-;1480:7;1513:1;1508;:6;;1500:49;;;;-1:-1:-1;;;1500:49:0;;6807:2:1;1500:49:0;;;6789:21:1;6846:2;6826:18;;;6819:30;6885:32;6865:18;;;6858:60;6935:18;;1500:49:0;6605:354:1;1500:49:0;1560:9;1572:5;1576:1;1572;:5;:::i;:::-;1560:17;1422:184;-1:-1:-1;;;;1422:184:0:o;1857:470::-;1915:7;2159:1;2164;2159:6;2155:47;;-1:-1:-1;2189:1:0;2182:8;;2155:47;2214:9;2226:5;2230:1;2226;:5;:::i;:::-;2214:17;-1:-1:-1;2259:1:0;2250:5;2254:1;2214:17;2250:5;:::i;:::-;:10;2242:56;;;;-1:-1:-1;;;2242:56:0;;7691:2:1;2242:56:0;;;7673:21:1;7730:2;7710:18;;;7703:30;7769:34;7749:18;;;7742:62;-1:-1:-1;;;7820:18:1;;;7813:31;7861:19;;2242:56:0;7489:397:1;2242:56:0;2318:1;1857:470;-1:-1:-1;;;1857:470:0:o;2795:333::-;2853:7;2952:1;2948;:5;2940:44;;;;-1:-1:-1;;;2940:44:0;;8093:2:1;2940:44:0;;;8075:21:1;8132:2;8112:18;;;8105:30;8171:28;8151:18;;;8144:56;8217:18;;2940:44:0;7891:350:1;2940:44:0;2995:9;3007:5;3011:1;3007;:5;:::i;966:181::-;1024:7;;1056:5;1060:1;1056;:5;:::i;:::-;1044:17;;1085:1;1080;:6;;1072:46;;;;-1:-1:-1;;;1072:46:0;;8448:2:1;1072:46:0;;;8430:21:1;8487:2;8467:18;;;8460:30;8526:29;8506:18;;;8499:57;8573:18;;1072:46:0;8246:351:1;14763:133:0;14831:5;;-1:-1:-1;;;;;14831:5:0;14817:10;:19;14809:79;;;;-1:-1:-1;;;14809:79:0;;8804:2:1;14809:79:0;;;8786:21:1;8843:2;8823:18;;;8816:30;8882:34;8862:18;;;8855:62;-1:-1:-1;;;8933:18:1;;;8926:45;8988:19;;14809:79:0;8602:411:1;10805:176:0;10914:58;;-1:-1:-1;;;;;5249:32:1;;10914:58:0;;;5231:51:1;5298:18;;;5291:34;;;10888:85:0;;10907:5;;-1:-1:-1;;;10937:23:0;5204:18:1;;10914:58:0;;;;-1:-1:-1;;10914:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;10914:58:0;-1:-1:-1;;;;;;10914:58:0;;;;;;;;;;10888:18;:85::i;:::-;10805:176;;;:::o;10989:204::-;11116:68;;-1:-1:-1;;;;;9276:15:1;;;11116:68:0;;;9258:34:1;9328:15;;9308:18;;;9301:43;9360:18;;;9353:34;;;11090:95:0;;11109:5;;-1:-1:-1;;;11139:27:0;9193:18:1;;11116:68:0;9018:375:1;11090:95:0;10989:204;;;;:::o;12799:1114::-;-1:-1:-1;;;;;13403:25:0;;5823:20;13395:71;;;;-1:-1:-1;;;13395:71:0;;9600:2:1;13395:71:0;;;9582:21:1;9639:2;9619:18;;;9612:30;9678:33;9658:18;;;9651:61;9729:18;;13395:71:0;9398:355:1;13395:71:0;13540:12;13554:23;13589:5;-1:-1:-1;;;;;13581:19:0;13601:4;13581:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13539:67;;;;13625:7;13617:52;;;;-1:-1:-1;;;13617:52:0;;10391:2:1;13617:52:0;;;10373:21:1;;;10410:18;;;10403:30;10469:34;10449:18;;;10442:62;10521:18;;13617:52:0;10189:356:1;13617:52:0;13686:17;;:21;13682:224;;13828:10;13817:30;;;;;;;;;;;;:::i;:::-;13809:85;;;;-1:-1:-1;;;13809:85:0;;11002:2:1;13809:85:0;;;10984:21:1;11041:2;11021:18;;;11014:30;11080:34;11060:18;;;11053:62;-1:-1:-1;;;11131:18:1;;;11124:40;11181:19;;13809:85:0;10800:406:1;14:173;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;565:118::-;651:5;644:13;637:21;630:5;627:32;617:60;;673:1;670;663:12;688:241;744:6;797:2;785:9;776:7;772:23;768:32;765:52;;;813:1;810;803:12;765:52;852:9;839:23;871:28;893:5;871:28;:::i;934:180::-;993:6;1046:2;1034:9;1025:7;1021:23;1017:32;1014:52;;;1062:1;1059;1052:12;1014:52;-1:-1:-1;1085:23:1;;934:180;-1:-1:-1;934:180:1:o;1741:254::-;1809:6;1817;1870:2;1858:9;1849:7;1845:23;1841:32;1838:52;;;1886:1;1883;1876:12;1838:52;1909:29;1928:9;1909:29;:::i;:::-;1899:39;1985:2;1970:18;;;;1957:32;;-1:-1:-1;;;1741:254:1:o;2000:127::-;2061:10;2056:3;2052:20;2049:1;2042:31;2092:4;2089:1;2082:15;2116:4;2113:1;2106:15;2132:128;2172:3;2203:1;2199:6;2196:1;2193:13;2190:39;;;2209:18;;:::i;:::-;-1:-1:-1;2245:9:1;;2132:128::o;3382:184::-;3452:6;3505:2;3493:9;3484:7;3480:23;3476:32;3473:52;;;3521:1;3518;3511:12;3473:52;-1:-1:-1;3544:16:1;;3382:184;-1:-1:-1;3382:184:1:o;6964:125::-;7004:4;7032:1;7029;7026:8;7023:34;;;7037:18;;:::i;:::-;-1:-1:-1;7074:9:1;;6964:125::o;7094:168::-;7134:7;7200:1;7196;7192:6;7188:14;7185:1;7182:21;7177:1;7170:9;7163:17;7159:45;7156:71;;;7207:18;;:::i;:::-;-1:-1:-1;7247:9:1;;7094:168::o;7267:217::-;7307:1;7333;7323:132;;7377:10;7372:3;7368:20;7365:1;7358:31;7412:4;7409:1;7402:15;7440:4;7437:1;7430:15;7323:132;-1:-1:-1;7469:9:1;;7267:217::o;9758:426::-;9887:3;9925:6;9919:13;9950:1;9960:129;9974:6;9971:1;9968:13;9960:129;;;10072:4;10056:14;;;10052:25;;10046:32;10033:11;;;10026:53;9989:12;9960:129;;;10107:6;10104:1;10101:13;10098:48;;;10142:1;10133:6;10128:3;10124:16;10117:27;10098:48;-1:-1:-1;10162:16:1;;;;;9758:426;-1:-1:-1;;9758:426:1:o;10550:245::-;10617:6;10670:2;10658:9;10649:7;10645:23;10641:32;10638:52;;;10686:1;10683;10676:12;10638:52;10718:9;10712:16;10737:28;10759:5;10737:28;:::i

Swarm Source

ipfs://a0e4b1772912af459364811a12e0fba15382ec9d21690dda8520411d98ee1d80

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.