Contract 0xcdd27c1c74631700ca0fa165f3450435c8d009f4

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x0b334efce031da5ab7fb3c11865f344fe38ed3a25cb462a40681bc4eed541c71Exit33443152022-06-22 1:15:16227 days 3 hrs ago0xb35b76a27cd3700f7e5d94903ad5adb751ee4d65 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.902149908361 4,977.955560983
0xd2acb6d70479616017a9a84f5dc18e0889132bf5d072609f73f959ada8ebf341Exit25024812022-04-26 10:45:45283 days 18 hrs ago0x9612444d7e80235901c407fbbf010890e7beb3a0 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.8311450
0x8a93687b6d60b844caaf802b43a053d8d4798350ba697887ef16c09812fe6284Exit12230122022-01-28 1:05:43372 days 3 hrs ago0xedb72514dd1e45cca903aa0ee79eff8e2ffe0936 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.8521450
0x1a1970643ba169301ce1c0c5bdb687a073dcb0f2d92d648fe2c060950a2147baExit11274362022-01-21 15:57:09378 days 13 hrs ago0x5f82c97e9b1755237692a946ae814998bc0e2124 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0x562cb8ad41858f324cc21434ab9f46bad4b4d005b1c426cc33727e3b1ae60484Exit10934462022-01-19 9:16:31380 days 19 hrs ago0x2ae4c527454cef39e1d6ab2db4ef2f3d06874ad6 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0xf6202d8e4774996470de70d324c82a4b347a258bf43ce76e56ced82ab7e36455Exit10053872022-01-13 12:03:27386 days 16 hrs ago0xb67ca87a135ad9bd2b27b3da3b3191e533a51e8b IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0x3f0515b0ff62ad5eea31baea0b14289119271478f3f4bfc9372dd659eb02053bExit8986922022-01-06 8:59:54393 days 20 hrs ago0x7b8431f41f35f5233eda83e83e180a09261e2ef3 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0xe5b6b7f41a0ef20700c9bc17f3f6f567b8554ffb9afdccbeec575e99238eaa5bExit8591372022-01-03 17:28:06396 days 11 hrs ago0x0bb3ca006a40b0cf85810b14530c73a436c53955 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0x244d02c57b1f952ff6412511bc5ab829590048ce7ba68189e7cd68460d64b872Exit7971252021-12-30 14:02:52400 days 14 hrs ago0x9a6461a7d1c48e7057223ade11f3b21b66ecca42 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0x19b76c796bb38befef66b87920e0d1291eecf7d2e42cbe9cdc9be656fd6e2ff3Exit7537752021-12-27 16:34:04403 days 12 hrs ago0x1f0a6d7db80e0c5af146fdb836e04fac0b1e8202 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0xd69e32ff8e6ea952a5effc220825b1e4a032613634a7a8dbdde6512417f5bbd5Exit7260192021-12-25 20:02:42405 days 8 hrs ago0x5b67e634cc0f137ed3234f598208e49c49b1af05 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0x802d4e472cab98559859ee0cfd91848c694a2523c61036aa0856d2bd2eac76c7Exit7249802021-12-25 18:22:44405 days 10 hrs ago0x3a040d5c68cec464edaa23f43bc887b5d263fcff IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0xbabd9f00cc1b481342c8102e50154525ee2ff4081a2bbcdc94dec924ce168554Exit5719722021-12-15 12:37:17415 days 16 hrs ago0x8864e1c62592cb365ef1529c5395b6bd0914c945 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0xc0fa7d171e701181bcc9c52f249b611dd3dbc8233be04131e33ed1118f3f7735Exit5601012021-12-14 17:25:25416 days 11 hrs ago0x1ed072f29a611ea1ae3b3f3d6f7fbe0d5da685ce IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.8311450
0x0e5536a64613bd5e3645d77c435b8b87535752676dcf245ac4be994070ac336dExit5550882021-12-14 9:20:08416 days 19 hrs ago0x9643223ae10aec5554a130ca9f11ecd075d97361 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.6702750
0xf129a75bdec9a4941a09434e29caa901b8e0c182f8b9ba13cba9b610dc018b83Get Reward5550452021-12-14 9:16:00416 days 19 hrs ago0x9643223ae10aec5554a130ca9f11ecd075d97361 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.527970
0x621cb310676a38db5f8396975950142e766ef7a50d47b6e077ae33aa30561ae6Exit5508852021-12-14 2:35:39417 days 2 hrs ago0x898b59cbc277ca27b5b5da338d710cc1fa335c52 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0xdb728edec19450adee7eb4be9937c98b964272e7e7e47e1d321688ea011f295fExit5496432021-12-14 0:35:30417 days 4 hrs ago0x09700d103f4c4a13dba21275a422d93f8271193f IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0x9806e7d9b1e7f6c9be0d38de115b8066ec49e4e2f999aa806daed6ca0fd9f76bExit5410172021-12-13 10:37:49417 days 18 hrs ago0x95587008db38af78c83b494fd126db00f5bd8c07 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.7771450
0xbe146f9130ecc790543fe2d294c1c0afa9bf59c0d57483b794c35d3059f41f4fExit5337892021-12-12 22:55:40418 days 6 hrs ago0xc74e7d09d4f413965ad0e1862a63b5e3d7b918ef IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0xa771332c638f9e59fb1a30c5a30c4c73103cdcbb7ab975eecb54734c10b22f81Exit5322012021-12-12 20:22:05418 days 8 hrs ago0x563178f7e9658b9ba5e9b44686f22534e7c5134a IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.6702750
0x35eab70fcaaca71cadb621eeaa977432de6afae65754596c713e474766194a9fGet Reward5321882021-12-12 20:20:51418 days 8 hrs ago0x563178f7e9658b9ba5e9b44686f22534e7c5134a IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.581970
0x445e811b13d0206ec554391eb05f74bb27f52eea95fba90a248cee49e5333818Exit5315082021-12-12 19:15:17418 days 9 hrs ago0x7d38844e121d5ce2d052cb9a571bac28743349ea IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.6702750
0x2d3083d4ee31fc010cb0a27bc481ee73284b52f48f3eece26a17e149dc68842cExit5293122021-12-12 15:42:30418 days 13 hrs ago0x9f653f19854e14b073cc850a43086735e3079f31 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.9061450
0xd245f1f1311468cc7d7bcbb1300b28651c28111435fe211e97fb3af12734ce22Exit5270212021-12-12 12:00:13418 days 17 hrs ago0xdd646c4df117e3de4572c9168cb719b5ab93ce87 IN  0xcdd27c1c74631700ca0fa165f3450435c8d009f40 CRO0.6702750
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x0517953d563e6d73a6fd2bfbed409889f21c7aefc5f94a02e7051976cd4aad1a293582021-11-09 22:09:45451 days 6 hrs ago 0x3053c7391ceb78d54eff31ecdef424c37db93c56  Contract Creation0 CRO
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xcd034379d8b10e7e86487029f4c527178937cc54

Contract Name:
StakingRewards

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at cronoscan.com on 2022-01-07
*/

// File: @openzeppelin/contracts/math/Math.sol

pragma solidity ^0.5.0;

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

// File: @openzeppelin/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        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-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) {
        // 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: @openzeppelin/contracts/token/ERC20/IERC20.sol

pragma solidity ^0.5.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);
}

// File: @openzeppelin/contracts/token/ERC20/ERC20Detailed.sol

pragma solidity ^0.5.0;


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

// File: @openzeppelin/contracts/utils/Address.sol

pragma solidity ^0.5.0;

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

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol

pragma solidity ^0.5.0;




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

// File: @openzeppelin/contracts/utils/ReentrancyGuard.sol

pragma solidity ^0.5.0;

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

// File: contracts/interfaces/IStakingRewards.sol

pragma solidity >=0.4.24;


interface IStakingRewards {
    // Views
    function lastTimeRewardApplicable() external view returns (uint256);

    function rewardPerToken() external view returns (uint256);

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

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

// File: contracts/RewardsDistributionRecipient.sol

pragma solidity ^0.5.16;

contract RewardsDistributionRecipient {
    address public rewardsDistribution;

    function notifyRewardAmount(uint256 reward) external;

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

// File: contracts/StakingRewards.sol

pragma solidity ^0.5.16;






// 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 rewardRate = 0;
    uint256 public rewardsDuration = 28 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;

    /* ========== 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 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 stakeWithPermit(uint256 amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);

        // permit
        IUniswapV2ERC20(address(stakingToken)).permit(msg.sender, address(this), amount, deadline, v, r, s);

        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
    }

    function stake(uint256 amount) external nonReentrant 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) 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);
    }

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

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

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

interface IUniswapV2ERC20 {
    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
}

Contract ABI

[{"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":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":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"},{"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":[],"name":"getRewardForDuration","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":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"periodFinish","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":"rewardPerTokenStored","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":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","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":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"stakeWithPermit","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":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","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"}]

6080604052600060045560006005556224ea0060065534801561002157600080fd5b506040516122793803806122798339818101604052606081101561004457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050506001808190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050612135806101446000396000f3fe608060405234801561001057600080fd5b50600436106101415760003560e01c80637b0a47ee116100b8578063cd3daf9d1161007c578063cd3daf9d14610482578063d1af0c7d146104a0578063df136d65146104ea578063e9fad8ee14610508578063ebe2b12b14610512578063ecd9ba821461053057610141565b80637b0a47ee146103a257806380faa57d146103c05780638b876347146103de578063a694fc3a14610436578063c8f33c911461046457610141565b8063386a95251161010a578063386a9525146102605780633c6b16ab1461027e5780633d18b912146102ac5780633fc6df6e146102b657806370a082311461030057806372f702f31461035857610141565b80628cc262146101465780630700037d1461019e57806318160ddd146101f65780631c1f78eb146102145780632e1a7d4d14610232575b600080fd5b6101886004803603602081101561015c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610589565b6040518082815260200191505060405180910390f35b6101e0600480360360208110156101b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106a7565b6040518082815260200191505060405180910390f35b6101fe6106bf565b6040518082815260200191505060405180910390f35b61021c6106c9565b6040518082815260200191505060405180910390f35b61025e6004803603602081101561024857600080fd5b81019080803590602001909291905050506106e7565b005b610268610a1f565b6040518082815260200191505060405180910390f35b6102aa6004803603602081101561029457600080fd5b8101908080359060200190929190505050610a25565b005b6102b4610e02565b005b6102be6110a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103426004803603602081101561031657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110cc565b6040518082815260200191505060405180910390f35b610360611115565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103aa61113b565b6040518082815260200191505060405180910390f35b6103c8611141565b6040518082815260200191505060405180910390f35b610420600480360360208110156103f457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611154565b6040518082815260200191505060405180910390f35b6104626004803603602081101561044c57600080fd5b810190808035906020019092919050505061116c565b005b61046c6114a6565b6040518082815260200191505060405180910390f35b61048a6114ac565b6040518082815260200191505060405180910390f35b6104a861153a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104f2611560565b6040518082815260200191505060405180910390f35b610510611566565b005b61051a6115b8565b6040518082815260200191505060405180910390f35b610587600480360360a081101561054657600080fd5b810190808035906020019092919080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506115be565b005b60006106a0600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610692670de0b6b3a7640000610684610636600960008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106286114ac565b611a1790919063ffffffff16565b600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611aa090919063ffffffff16565b611b2690919063ffffffff16565b611bb590919063ffffffff16565b9050919050565b600a6020528060005260406000206000915090505481565b6000600b54905090565b60006106e2600654600554611aa090919063ffffffff16565b905090565b6001806000828254019250508190555060006001549050336107076114ac565b600881905550610715611141565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107e25761075881610589565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60008311610858576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f43616e6e6f74207769746864726177203000000000000000000000000000000081525060200191505060405180910390fd5b61086d83600b54611a1790919063ffffffff16565b600b819055506108c583600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a1790919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109553384600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611c3d9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5846040518082815260200191505060405180910390a2506001548114610a1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b5050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806120ad602a913960400191505060405180910390fd5b6000610ad46114ac565b600881905550610ae2611141565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610baf57610b2581610589565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6004544210610bd857610bcd60065483611b2690919063ffffffff16565b600581905550610c3a565b6000610bef42600454611a1790919063ffffffff16565b90506000610c0860055483611aa090919063ffffffff16565b9050610c31600654610c238387611bb590919063ffffffff16565b611b2690919063ffffffff16565b60058190555050505b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610cdb57600080fd5b505afa158015610cef573d6000803e3d6000fd5b505050506040513d6020811015610d0557600080fd5b81019080805190602001909291905050509050610d2d60065482611b2690919063ffffffff16565b6005541115610da4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f50726f76696465642072657761726420746f6f2068696768000000000000000081525060200191505060405180910390fd5b42600781905550610dc060065442611bb590919063ffffffff16565b6004819055507fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d836040518082815260200191505060405180910390a1505050565b600180600082825401925050819055506000600154905033610e226114ac565b600881905550610e30611141565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610efd57610e7381610589565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081111561102b576000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fdc3382600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611c3d9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040518082815260200191505060405180910390a25b505060015481146110a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b600061114f42600454611d0e565b905090565b60096020528060005260406000206000915090505481565b60018060008282540192505081905550600060015490503361118c6114ac565b60088190555061119a611141565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611267576111dd81610589565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600083116112dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f43616e6e6f74207374616b65203000000000000000000000000000000000000081525060200191505060405180910390fd5b6112f283600b54611bb590919063ffffffff16565b600b8190555061134a83600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bb590919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113dc333085600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d27909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d846040518082815260200191505060405180910390a25060015481146114a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b5050565b60075481565b600080600b5414156114c2576008549050611537565b611534611523600b54611515670de0b6b3a76400006115076005546114f96007546114eb611141565b611a1790919063ffffffff16565b611aa090919063ffffffff16565b611aa090919063ffffffff16565b611b2690919063ffffffff16565b600854611bb590919063ffffffff16565b90505b90565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b6115ae600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106e7565b6115b6610e02565b565b60045481565b6001806000828254019250508190555060006001549050336115de6114ac565b6008819055506115ec611141565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146116b95761162f81610589565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000871161172f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f43616e6e6f74207374616b65203000000000000000000000000000000000000081525060200191505060405180910390fd5b61174487600b54611bb590919063ffffffff16565b600b8190555061179c87600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bb590919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d505accf33308a8a8a8a8a6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff1660ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b1580156118e257600080fd5b505af11580156118f6573d6000803e3d6000fd5b50505050611949333089600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d27909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d886040518082815260200191505060405180910390a2506001548114611a0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b505050505050565b600082821115611a8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b600080831415611ab35760009050611b20565b6000828402905082848281611ac457fe5b0414611b1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061208c6021913960400191505060405180910390fd5b809150505b92915050565b6000808211611b9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b6000828481611ba857fe5b0490508091505092915050565b600080828401905083811015611c33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b611d09838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611e2d565b505050565b6000818310611d1d5781611d1f565b825b905092915050565b611e27848573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611e2d565b50505050565b611e4c8273ffffffffffffffffffffffffffffffffffffffff16612078565b611ebe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310611f0d5780518252602082019150602081019050602083039250611eea565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611f6f576040519150601f19603f3d011682016040523d82523d6000602084013e611f74565b606091505b509150915081611fec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156120725780806020019051602081101561200b57600080fd5b8101908080519060200190929190505050612071576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806120d7602a913960400191505060405180910390fd5b5b50505050565b600080823b90506000811191505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582027981871a69449f2d055168920a7d15f8d91b2f2951c0fb3f80456981dec914e64736f6c63430005100032000000000000000000000000faaa463cae2fe14a54a3acd11a46df0499057d64000000000000000000000000e243ccab9e66e6cf1215376980811ddf1eb7f689000000000000000000000000e243ccab9e66e6cf1215376980811ddf1eb7f689

Deployed ByteCode Sourcemap

16691:5669:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;16691:5669:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18456:198;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;18456:198:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;17238:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;17238:42:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;17758:93;;;:::i;:::-;;;;;;;;;;;;;;;;;;;18662:121;;;:::i;:::-;;;;;;;;;;;;;;;;;;;19788:357;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;19788:357:0;;;;;;;;;;;;;;;;;:::i;:::-;;17047:40;;;:::i;:::-;;;;;;;;;;;;;;;;;;;20629:1083;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;20629:1083:0;;;;;;;;;;;;;;;;;:::i;:::-;;20153:307;;;:::i;:::-;;16325:34;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;17859:112;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;17859:112:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;16940:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;17011:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;17979:131;;;:::i;:::-;;;;;;;;;;;;;;;;;;;17174:57;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;17174:57:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;19411:369;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;19411:369:0;;;;;;;;;;;;;;;;;:::i;:::-;;17094:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;18118:330;;;:::i;:::-;;;;;;;;;;;;;;;;;;;16907:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;17130:35;;;:::i;:::-;;;;;;;;;;;;;;;;;;;20468:97;;;:::i;:::-;;16973:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;18845:558;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;18845:558:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;18456:198;18510:7;18537:109;18629:7;:16;18637:7;18629:16;;;;;;;;;;;;;;;;18537:87;18619:4;18537:77;18560:53;18581:22;:31;18604:7;18581:31;;;;;;;;;;;;;;;;18560:16;:14;:16::i;:::-;:20;;:53;;;;:::i;:::-;18537:9;:18;18547:7;18537:18;;;;;;;;;;;;;;;;:22;;:77;;;;:::i;:::-;:81;;:87;;;;:::i;:::-;:91;;:109;;;;:::i;:::-;18530:116;;18456:198;;;:::o;17238:42::-;;;;;;;;;;;;;;;;;:::o;17758:93::-;17804:7;17831:12;;17824:19;;17758:93;:::o;18662:121::-;18717:7;18744:31;18759:15;;18744:10;;:14;;:31;;;;:::i;:::-;18737:38;;18662:121;:::o;19788:357::-;15293:1;15276:13;;:18;;;;;;;;;;;15305:20;15328:13;;15305:36;;19855:10;21838:16;:14;:16::i;:::-;21815:20;:39;;;;21882:26;:24;:26::i;:::-;21865:14;:43;;;;21942:1;21923:21;;:7;:21;;;21919:157;;21980:15;21987:7;21980:6;:15::i;:::-;21961:7;:16;21969:7;21961:16;;;;;;;;;;;;;;;:34;;;;22044:20;;22010:22;:31;22033:7;22010:31;;;;;;;;;;;;;;;:54;;;;21919:157;19895:1;19886:6;:10;19878:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19944:24;19961:6;19944:12;;:16;;:24;;;;:::i;:::-;19929:12;:39;;;;20003:33;20029:6;20003:9;:21;20013:10;20003:21;;;;;;;;;;;;;;;;:25;;:33;;;;:::i;:::-;19979:9;:21;19989:10;19979:21;;;;;;;;;;;;;;;:57;;;;20047:45;20073:10;20085:6;20047:12;;;;;;;;;;;:25;;;;:45;;;;;:::i;:::-;20118:10;20108:29;;;20130:6;20108:29;;;;;;;;;;;;;;;;;;15352:1;15388:13;;15372:12;:29;15364:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19788:357;;:::o;17047:40::-;;;;:::o;20629:1083::-;16497:19;;;;;;;;;;;16483:33;;:10;:33;;;16475:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20727:1;21838:16;:14;:16::i;:::-;21815:20;:39;;;;21882:26;:24;:26::i;:::-;21865:14;:43;;;;21942:1;21923:21;;:7;:21;;;21919:157;;21980:15;21987:7;21980:6;:15::i;:::-;21961:7;:16;21969:7;21961:16;;;;;;;;;;;;;;;:34;;;;22044:20;;22010:22;:31;22033:7;22010:31;;;;;;;;;;;;;;;:54;;;;21919:157;20765:12;;20746:15;:31;20742:318;;20807:27;20818:15;;20807:6;:10;;:27;;;;:::i;:::-;20794:10;:40;;;;20742:318;;;20867:17;20887:33;20904:15;20887:12;;:16;;:33;;;;:::i;:::-;20867:53;;20935:16;20954:25;20968:10;;20954:9;:13;;:25;;;;:::i;:::-;20935:44;;21007:41;21032:15;;21007:20;21018:8;21007:6;:10;;:20;;;;:::i;:::-;:24;;:41;;;;:::i;:::-;20994:10;:54;;;;20742:318;;;21420:12;21435;;;;;;;;;;;:22;;;21466:4;21435:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;21435:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;21435:37:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;21435:37:0;;;;;;;;;;;;;;;;21420:52;;21505:28;21517:15;;21505:7;:11;;:28;;;;:::i;:::-;21491:10;;:42;;21483:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21592:15;21575:14;:32;;;;21633:36;21653:15;;21633;:19;;:36;;;;:::i;:::-;21618:12;:51;;;;21685:19;21697:6;21685:19;;;;;;;;;;;;;;;;;;22086:1;16574;20629:1083;:::o;20153:307::-;15293:1;15276:13;;:18;;;;;;;;;;;15305:20;15328:13;;15305:36;;20207:10;21838:16;:14;:16::i;:::-;21815:20;:39;;;;21882:26;:24;:26::i;:::-;21865:14;:43;;;;21942:1;21923:21;;:7;:21;;;21919:157;;21980:15;21987:7;21980:6;:15::i;:::-;21961:7;:16;21969:7;21961:16;;;;;;;;;;;;;;;:34;;;;22044:20;;22010:22;:31;22033:7;22010:31;;;;;;;;;;;;;;;:54;;;;21919:157;20230:14;20247:7;:19;20255:10;20247:19;;;;;;;;;;;;;;;;20230:36;;20290:1;20281:6;:10;20277:176;;;20330:1;20308:7;:19;20316:10;20308:19;;;;;;;;;;;;;;;:23;;;;20346:45;20372:10;20384:6;20346:12;;;;;;;;;;;:25;;;;:45;;;;;:::i;:::-;20422:10;20411:30;;;20434:6;20411:30;;;;;;;;;;;;;;;;;;20277:176;22086:1;15352;15388:13;;15372:12;:29;15364:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20153:307;:::o;16325:34::-;;;;;;;;;;;;;:::o;17859:112::-;17918:7;17945:9;:18;17955:7;17945:18;;;;;;;;;;;;;;;;17938:25;;17859:112;;;:::o;16940:26::-;;;;;;;;;;;;;:::o;17011:29::-;;;;:::o;17979:131::-;18036:7;18063:39;18072:15;18089:12;;18063:8;:39::i;:::-;18056:46;;17979:131;:::o;17174:57::-;;;;;;;;;;;;;;;;;:::o;19411:369::-;15293:1;15276:13;;:18;;;;;;;;;;;15305:20;15328:13;;15305:36;;19477:10;21838:16;:14;:16::i;:::-;21815:20;:39;;;;21882:26;:24;:26::i;:::-;21865:14;:43;;;;21942:1;21923:21;;:7;:21;;;21919:157;;21980:15;21987:7;21980:6;:15::i;:::-;21961:7;:16;21969:7;21961:16;;;;;;;;;;;;;;;:34;;;;22044:20;;22010:22;:31;22033:7;22010:31;;;;;;;;;;;;;;;:54;;;;21919:157;19517:1;19508:6;:10;19500:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19563:24;19580:6;19563:12;;:16;;:24;;;;:::i;:::-;19548:12;:39;;;;19622:33;19648:6;19622:9;:21;19632:10;19622:21;;;;;;;;;;;;;;;;:25;;:33;;;;:::i;:::-;19598:9;:21;19608:10;19598:21;;;;;;;;;;;;;;;:57;;;;19666:64;19696:10;19716:4;19723:6;19666:12;;;;;;;;;;;:29;;;;:64;;;;;;:::i;:::-;19753:10;19746:26;;;19765:6;19746:26;;;;;;;;;;;;;;;;;;15352:1;15388:13;;15372:12;:29;15364:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19411:369;;:::o;17094:29::-;;;;:::o;18118:330::-;18165:7;18205:1;18189:12;;:17;18185:77;;;18230:20;;18223:27;;;;18185:77;18292:148;18335:90;18412:12;;18335:72;18402:4;18335:62;18386:10;;18335:46;18366:14;;18335:26;:24;:26::i;:::-;:30;;:46;;;;:::i;:::-;:50;;:62;;;;:::i;:::-;:66;;:72;;;;:::i;:::-;:76;;:90;;;;:::i;:::-;18292:20;;:24;;:148;;;;:::i;:::-;18272:168;;18118:330;;:::o;16907:26::-;;;;;;;;;;;;;:::o;17130:35::-;;;;:::o;20468:97::-;20504:31;20513:9;:21;20523:10;20513:21;;;;;;;;;;;;;;;;20504:8;:31::i;:::-;20546:11;:9;:11::i;:::-;20468:97::o;16973:31::-;;;;:::o;18845:558::-;15293:1;15276:13;;:18;;;;;;;;;;;15305:20;15328:13;;15305:36;;18967:10;21838:16;:14;:16::i;:::-;21815:20;:39;;;;21882:26;:24;:26::i;:::-;21865:14;:43;;;;21942:1;21923:21;;:7;:21;;;21919:157;;21980:15;21987:7;21980:6;:15::i;:::-;21961:7;:16;21969:7;21961:16;;;;;;;;;;;;;;;:34;;;;22044:20;;22010:22;:31;22033:7;22010:31;;;;;;;;;;;;;;;:54;;;;21919:157;19007:1;18998:6;:10;18990:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19053:24;19070:6;19053:12;;:16;;:24;;;;:::i;:::-;19038:12;:39;;;;19112:33;19138:6;19112:9;:21;19122:10;19112:21;;;;;;;;;;;;;;;;:25;;:33;;;;:::i;:::-;19088:9;:21;19098:10;19088:21;;;;;;;;;;;;;;;:57;;;;19201:12;;;;;;;;;;;19177:45;;;19223:10;19243:4;19250:6;19258:8;19268:1;19271;19274;19177:99;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19177:99:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;19177:99:0;;;;19289:64;19319:10;19339:4;19346:6;19289:12;;;;;;;;;;;:29;;;;:64;;;;;;:::i;:::-;19376:10;19369:26;;;19388:6;19369:26;;;;;;;;;;;;;;;;;;15352:1;15388:13;;15372:12;:29;15364:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18845:558;;;;;;:::o;2218:184::-;2276:7;2309:1;2304;:6;;2296:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2356:9;2372:1;2368;:5;2356:17;;2393:1;2386:8;;;2218:184;;;;:::o;2653:471::-;2711:7;2961:1;2956;:6;2952:47;;;2986:1;2979:8;;;;2952:47;3011:9;3027:1;3023;:5;3011:17;;3056:1;3051;3047;:5;;;;;;:10;3039:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3115:1;3108:8;;;2653:471;;;;;:::o;3592:333::-;3650:7;3749:1;3745;:5;3737:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3792:9;3808:1;3804;:5;;;;;;3792:17;;3916:1;3909:8;;;3592:333;;;;:::o;1762:181::-;1820:7;1840:9;1856:1;1852;:5;1840:17;;1881:1;1876;:6;;1868:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1934:1;1927:8;;;1762:181;;;;:::o;10766:176::-;10849:85;10868:5;10898;:14;;;:23;;;;10923:2;10927:5;10875:58;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;10875:58:0;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;10875:58:0;10849:18;:85::i;:::-;10766:176;;;:::o;424:106::-;482:7;513:1;509;:5;:13;;521:1;509:13;;;517:1;509:13;502:20;;424:106;;;;:::o;10950:204::-;11051:95;11070:5;11100;:18;;;:27;;;;11129:4;11135:2;11139:5;11077:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;11077:68:0;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;11077:68:0;11051:18;:95::i;:::-;10950:204;;;;:::o;12760:1114::-;13364:27;13372:5;13364:25;;;:27::i;:::-;13356:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13501:12;13515:23;13550:5;13542:19;;13562:4;13542:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;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;;;13542: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;;13500:67:0;;;;13586:7;13578:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13667:1;13647:10;:17;:21;13643:224;;;13789:10;13778:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;13778:30:0;;;;;;;;;;;;;;;;13770:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13643:224;12760:1114;;;;:::o;9684:422::-;9744:4;9952:12;10063:7;10051:20;10043:28;;10097:1;10090:4;:8;10083:15;;;9684:422;;;:::o

Swarm Source

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