ETH Price: $1,978.30 (-5.25%)

Contract

0x59A9c0300818df7b5Bd6ffefF8D8DC7453686A4F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Exit241392382026-01-01 10:39:2364 days ago1767263963IN
0x59A9c030...453686A4F
0 ETH0.000277442.03259047
Get Reward222684652025-04-14 16:37:47326 days ago1744648667IN
0x59A9c030...453686A4F
0 ETH0.000203054.53604909
Get Reward222684642025-04-14 16:37:35326 days ago1744648655IN
0x59A9c030...453686A4F
0 ETH0.000381284.37736811
Withdraw222684582025-04-14 16:36:11326 days ago1744648571IN
0x59A9c030...453686A4F
0 ETH0.000475874.46227759
Exit217844802025-02-06 2:28:35393 days ago1738808915IN
0x59A9c030...453686A4F
0 ETH0.000042820.9
Get Reward217746052025-02-04 17:23:47395 days ago1738689827IN
0x59A9c030...453686A4F
0 ETH0.000374324.29749533
Withdraw217745532025-02-04 17:13:11395 days ago1738689191IN
0x59A9c030...453686A4F
0 ETH0.000393013.68536486
Exit212808342024-11-27 18:20:35464 days ago1732731635IN
0x59A9c030...453686A4F
0 ETH0.0017872420
Get Reward212808322024-11-27 18:20:11464 days ago1732731611IN
0x59A9c030...453686A4F
0 ETH0.0017495919.0279254
Withdraw203185022024-07-16 10:34:11598 days ago1721126051IN
0x59A9c030...453686A4F
0 ETH0.000398425.56128357
Withdraw203184552024-07-16 10:24:35598 days ago1721125475IN
0x59A9c030...453686A4F
0 ETH0.000414985.79244724
Withdraw203184212024-07-16 10:17:47598 days ago1721125067IN
0x59A9c030...453686A4F
0 ETH0.000511775.77078476
Get Reward203184012024-07-16 10:13:47598 days ago1721124827IN
0x59A9c030...453686A4F
0 ETH0.000607376.60554056
Withdraw196217722024-04-10 0:51:59696 days ago1712710319IN
0x59A9c030...453686A4F
0 ETH0.0013959515.73456189
Withdraw196209552024-04-09 22:06:59696 days ago1712700419IN
0x59A9c030...453686A4F
0 ETH0.0014168819.78032013
Withdraw196209112024-04-09 21:58:11696 days ago1712699891IN
0x59A9c030...453686A4F
0 ETH0.0014328920.01053038
Withdraw196208942024-04-09 21:54:47696 days ago1712699687IN
0x59A9c030...453686A4F
0 ETH0.0024614322.0940564
Withdraw194788002024-03-20 22:11:11716 days ago1710972671IN
0x59A9c030...453686A4F
0 ETH0.0034286840.83958086
Get Reward194787772024-03-20 22:06:35716 days ago1710972395IN
0x59A9c030...453686A4F
0 ETH0.0040492744.0382799
Withdraw189214692024-01-02 18:26:35794 days ago1704219995IN
0x59A9c030...453686A4F
0 ETH0.0015501418.46666392
Withdraw189173512024-01-02 4:32:47794 days ago1704169967IN
0x59A9c030...453686A4F
0 ETH0.0011162113.29535806
Get Reward189166172024-01-02 2:04:59794 days ago1704161099IN
0x59A9c030...453686A4F
0 ETH0.0010745513.7693346
Withdraw188867612023-12-28 21:24:47799 days ago1703798687IN
0x59A9c030...453686A4F
0 ETH0.0017668821.04857072
Get Reward188867582023-12-28 21:24:11799 days ago1703798651IN
0x59A9c030...453686A4F
0 ETH0.0016628821.30813929
Get Reward188855322023-12-28 17:16:23799 days ago1703783783IN
0x59A9c030...453686A4F
0 ETH0.0022008331.4386598
View all transactions

View more zero value Internal Transactions in Advanced View mode

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

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
KiraStaking

Compiler Version
v0.6.2+commit.bacdbe57

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2020-12-05
*/

pragma solidity 0.6.2;


// SPDX-License-Identifier: MIT
/**
 * @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);
    }
}

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

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

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

        return c;
    }

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

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

// SPDX-License-Identifier: MIT
/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// SPDX-License-Identifier: MIT
/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies 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 Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

// SPDX-License-Identifier: MIT
/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT
/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

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

    function rewardPerToken() external view returns (uint256);

    function earned(address account) 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;
}

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);
}

// Inheritance
contract Pausable is Owned {
    uint256 public lastPauseTime;
    bool public paused;

    constructor(address _owner) internal Owned(_owner) {
        // 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 = now;
        }

        // 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');
        _;
    }
}

// Inheritance
contract KiraStaking is IKiraStaking, ReentrancyGuard, Pausable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

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

    uint256 public periodFinish;
    uint256 public rewardRate;
    uint256 public rewardsDuration;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    uint256 public lastBalance;
    uint256 public totalSupply;

    IERC20 public rewardsToken;
    IERC20 public stakingToken;

    mapping(address => uint256) private userRewardPerTokenPaid;
    mapping(address => uint256) private rewards;
    mapping(address => uint256) private _balances;

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

    constructor(
        address _owner,
        address _rewardsToken,
        address _stakingToken
    ) public Pausable(_owner) {
        rewardsToken = IERC20(_rewardsToken);
        stakingToken = IERC20(_stakingToken);
    }

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

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

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

    function rewardPerToken() public override 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 override view returns (uint256) {
        return _balances[account].mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add(rewards[account]);
    }

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

    function stake(uint256 amount) external override 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 override 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 override 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 override {
        withdraw(_balances[msg.sender]);
        getReward();
    }

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

    function notifyRewardAmount(uint256 reward) external onlyOwner updateReward(address(0)) {
        require(rewardRate > 0, 'Reward Rate is not yet set');
        if (block.timestamp >= periodFinish) {
            rewardsDuration = reward.div(rewardRate);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardsDuration = reward.add(leftover).div(rewardRate);
        }

        // 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.
        uint256 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);
    }

    function setRewardRate(uint256 rewardsPerInterval, uint256 interval) external onlyOwner {
        require(rewardsPerInterval > 0 && interval > 0, 'rewardsPerInterval and interval should be greater than 0');
        require(block.timestamp > periodFinish, 'Previous rewards period must be complete before changing the reward rate');
        rewardRate = rewardsPerInterval.div(interval);

        RewardRateUpdated(rewardsPerInterval, interval, rewardRate);
    }

    /* ========== 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);
    event RewardRateUpdated(uint256 rewardsPerInterval, uint256 interval, uint256 rewardRate);
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_owner","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":"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":"rewardsPerInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRate","type":"uint256"}],"name":"RewardRateUpdated","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":"lastBalance","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":[],"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":[],"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":"uint256","name":"rewardsPerInterval","type":"uint256"},{"internalType":"uint256","name":"interval","type":"uint256"}],"name":"setRewardRate","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":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516117833803806117838339818101604052606081101561003357600080fd5b5080516020820151604090920151600160005590919082806001600160a01b0381166100a6576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040805160008152602081019290925280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1506001546001600160a01b0316610152576040805162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b604482015290519081900360640190fd5b50600c80546001600160a01b039384166001600160a01b031991821617909155600d8054929093169116179055506115f48061018f6000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806379ba5097116100de578063a694fc3a11610097578063d1af0c7d11610071578063d1af0c7d14610351578063df136d6514610359578063e9fad8ee14610361578063ebe2b12b146103695761018d565b8063a694fc3a14610324578063c8f33c9114610341578063cd3daf9d146103495761018d565b806379ba5097146102f45780637b0a47ee146102fc57806380faa57d146103045780638da5cb5b1461030c5780638f1c56bd1461031457806391b4ded91461031c5761018d565b8063386a95251161014b57806353a47bb71161012557806353a47bb7146102865780635c975abb146102aa57806370a08231146102c657806372f702f3146102ec5761018d565b8063386a9525146102595780633c6b16ab146102615780633d18b9121461027e5761018d565b80628cc262146101925780631627540c146101ca57806316c38b3c146101f257806318160ddd146102115780632e1a7d4d146102195780633462e0a814610236575b600080fd5b6101b8600480360360208110156101a857600080fd5b50356001600160a01b0316610371565b60408051918252519081900360200190f35b6101f0600480360360208110156101e057600080fd5b50356001600160a01b0316610407565b005b6101f06004803603602081101561020857600080fd5b50351515610463565b6101b86104dd565b6101f06004803603602081101561022f57600080fd5b50356104e3565b6101f06004803603604081101561024c57600080fd5b5080359060200135610685565b6101b8610771565b6101f06004803603602081101561027757600080fd5b5035610777565b6101f06109de565b61028e610b15565b604080516001600160a01b039092168252519081900360200190f35b6102b2610b24565b604080519115158252519081900360200190f35b6101b8600480360360208110156102dc57600080fd5b50356001600160a01b0316610b2d565b61028e610b48565b6101f0610b57565b6101b8610c13565b6101b8610c19565b61028e610c2d565b6101b8610c3c565b6101b8610c42565b6101f06004803603602081101561033a57600080fd5b5035610c48565b6101b8610e2a565b6101b8610e30565b61028e610e8a565b6101b8610e99565b6101f0610e9f565b6101b8610ec2565b6001600160a01b0381166000908152600f6020908152604080832054600e90925282205461040191906103f590670de0b6b3a7640000906103e9906103c4906103b8610e30565b9063ffffffff610ec816565b6001600160a01b0388166000908152601060205260409020549063ffffffff610f1116565b9063ffffffff610f6a16565b9063ffffffff610fac16565b92915050565b61040f611006565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b61046b611006565b60045460ff1615158115151415610481576104da565b6004805460ff1916821515179081905560ff161561049e57426003555b6004546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b600b5481565b6002600054141561053b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005533610549610e30565b600955610554610c19565b6008556001600160a01b0381161561059b5761056f81610371565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b600082116105e4576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600b546105f7908363ffffffff610ec816565b600b553360009081526010602052604090205461061a908363ffffffff610ec816565b33600081815260106020526040902091909155600d54610646916001600160a01b03909116908461104f565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506001600055565b61068d611006565b60008211801561069d5750600081115b6106d85760405162461bcd60e51b81526004018080602001828103825260388152602001806114896038913960400191505060405180910390fd5b60055442116107185760405162461bcd60e51b81526004018080602001828103825260488152602001806114c16048913960600191505060405180910390fd5b610728828263ffffffff610f6a16565b6006819055604080518481526020810184905280820192909252517f69155044ae1e4cf9acf985cae44e0d86b5e592e3fb029bc9b39f63b0bdaa4a629181900360600190a15050565b60075481565b61077f611006565b6000610789610e30565b600955610794610c19565b6008556001600160a01b038116156107db576107af81610371565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b600060065411610832576040805162461bcd60e51b815260206004820152601a60248201527f5265776172642052617465206973206e6f742079657420736574000000000000604482015290519081900360640190fd5b60055442106108575760065461084f90839063ffffffff610f6a16565b6007556108a6565b60055460009061086d904263ffffffff610ec816565b9050600061088660065483610f1190919063ffffffff16565b6006549091506108a0906103e9868463ffffffff610fac16565b60075550505b600c54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156108f157600080fd5b505afa158015610905573d6000803e3d6000fd5b505050506040513d602081101561091b57600080fd5b505160075490915061093490829063ffffffff610f6a16565b600654111561098a576040805162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b4260088190556007546109a3919063ffffffff610fac16565b6005556040805184815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1505050565b60026000541415610a36576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005533610a44610e30565b600955610a4f610c19565b6008556001600160a01b03811615610a9657610a6a81610371565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b336000908152600f60205260409020548015610b0c57336000818152600f6020526040812055600c54610ad5916001600160a01b03909116908361104f565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001600055565b6002546001600160a01b031681565b60045460ff1681565b6001600160a01b031660009081526010602052604090205490565b600d546001600160a01b031681565b6002546001600160a01b03163314610ba05760405162461bcd60e51b81526004018080602001828103825260358152602001806114546035913960400191505060405180910390fd5b600154600254604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160028054600180546001600160a01b03199081166001600160a01b03841617909155169055565b60065481565b6000610c27426005546110a6565b90505b90565b6001546001600160a01b031681565b600a5481565b60035481565b60026000541415610ca0576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005560045460ff1615610ce75760405162461bcd60e51b815260040180806020018281038252603c815260200180611559603c913960400191505060405180910390fd5b33610cf0610e30565b600955610cfb610c19565b6008556001600160a01b03811615610d4257610d1681610371565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b60008211610d88576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600b54610d9b908363ffffffff610fac16565b600b5533600090815260106020526040902054610dbe908363ffffffff610fac16565b33600081815260106020526040902091909155600d54610deb916001600160a01b039091169030856110bc565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001600055565b60085481565b6000600b5460001415610e465750600954610c2a565b610c27610e7b600b546103e9670de0b6b3a7640000610e6f600654610e6f6008546103b8610c19565b9063ffffffff610f1116565b6009549063ffffffff610fac16565b600c546001600160a01b031681565b60095481565b33600090815260106020526040902054610eb8906104e3565b610ec06109de565b565b60055481565b6000610f0a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061111c565b9392505050565b600082610f2057506000610401565b82820282848281610f2d57fe5b0414610f0a5760405162461bcd60e51b81526004018080602001828103825260218152602001806115386021913960400191505060405180910390fd5b6000610f0a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506111b3565b600082820183811015610f0a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001546001600160a01b03163314610ec05760405162461bcd60e51b815260040180806020018281038252602f815260200180611509602f913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110a1908490611218565b505050565b60008183106110b55781610f0a565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611116908590611218565b50505050565b600081848411156111ab5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611170578181015183820152602001611158565b50505050905090810190601f16801561119d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836112025760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611170578181015183820152602001611158565b50600083858161120e57fe5b0495945050505050565b606061126d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112c99092919063ffffffff16565b8051909150156110a15780806020019051602081101561128c57600080fd5b50516110a15760405162461bcd60e51b815260040180806020018281038252602a815260200180611595602a913960400191505060405180910390fd5b60606112d884846000856112e0565b949350505050565b60606112eb8561144d565b61133c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061137b5780518252601f19909201916020918201910161135c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146113dd576040519150601f19603f3d011682016040523d82523d6000602084013e6113e2565b606091505b509150915081156113f65791506112d89050565b8051156114065780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315611170578181015183820152602001611158565b3b15159056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697072657761726473506572496e74657276616c20616e6420696e74657276616c2073686f756c642062652067726561746572207468616e203050726576696f7573207265776172647320706572696f64206d75737420626520636f6d706c657465206265666f7265206368616e67696e67207468652072657761726420726174654f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e7472616374206973207061757365645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209721b1428a881bffdb5adc9a51c73ebedefc4023ffb159a40935ed0de0f5351b64736f6c634300060200330000000000000000000000001c77d6a40f9a193857df146a849fb49d184460cb00000000000000000000000016980b3b4a3f9d89e33311b5aa8f80303e5ca4f80000000000000000000000001bfffb738d69167d5592160a47d5404a3cf5a846

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018d5760003560e01c806379ba5097116100de578063a694fc3a11610097578063d1af0c7d11610071578063d1af0c7d14610351578063df136d6514610359578063e9fad8ee14610361578063ebe2b12b146103695761018d565b8063a694fc3a14610324578063c8f33c9114610341578063cd3daf9d146103495761018d565b806379ba5097146102f45780637b0a47ee146102fc57806380faa57d146103045780638da5cb5b1461030c5780638f1c56bd1461031457806391b4ded91461031c5761018d565b8063386a95251161014b57806353a47bb71161012557806353a47bb7146102865780635c975abb146102aa57806370a08231146102c657806372f702f3146102ec5761018d565b8063386a9525146102595780633c6b16ab146102615780633d18b9121461027e5761018d565b80628cc262146101925780631627540c146101ca57806316c38b3c146101f257806318160ddd146102115780632e1a7d4d146102195780633462e0a814610236575b600080fd5b6101b8600480360360208110156101a857600080fd5b50356001600160a01b0316610371565b60408051918252519081900360200190f35b6101f0600480360360208110156101e057600080fd5b50356001600160a01b0316610407565b005b6101f06004803603602081101561020857600080fd5b50351515610463565b6101b86104dd565b6101f06004803603602081101561022f57600080fd5b50356104e3565b6101f06004803603604081101561024c57600080fd5b5080359060200135610685565b6101b8610771565b6101f06004803603602081101561027757600080fd5b5035610777565b6101f06109de565b61028e610b15565b604080516001600160a01b039092168252519081900360200190f35b6102b2610b24565b604080519115158252519081900360200190f35b6101b8600480360360208110156102dc57600080fd5b50356001600160a01b0316610b2d565b61028e610b48565b6101f0610b57565b6101b8610c13565b6101b8610c19565b61028e610c2d565b6101b8610c3c565b6101b8610c42565b6101f06004803603602081101561033a57600080fd5b5035610c48565b6101b8610e2a565b6101b8610e30565b61028e610e8a565b6101b8610e99565b6101f0610e9f565b6101b8610ec2565b6001600160a01b0381166000908152600f6020908152604080832054600e90925282205461040191906103f590670de0b6b3a7640000906103e9906103c4906103b8610e30565b9063ffffffff610ec816565b6001600160a01b0388166000908152601060205260409020549063ffffffff610f1116565b9063ffffffff610f6a16565b9063ffffffff610fac16565b92915050565b61040f611006565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b61046b611006565b60045460ff1615158115151415610481576104da565b6004805460ff1916821515179081905560ff161561049e57426003555b6004546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b600b5481565b6002600054141561053b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005533610549610e30565b600955610554610c19565b6008556001600160a01b0381161561059b5761056f81610371565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b600082116105e4576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600b546105f7908363ffffffff610ec816565b600b553360009081526010602052604090205461061a908363ffffffff610ec816565b33600081815260106020526040902091909155600d54610646916001600160a01b03909116908461104f565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506001600055565b61068d611006565b60008211801561069d5750600081115b6106d85760405162461bcd60e51b81526004018080602001828103825260388152602001806114896038913960400191505060405180910390fd5b60055442116107185760405162461bcd60e51b81526004018080602001828103825260488152602001806114c16048913960600191505060405180910390fd5b610728828263ffffffff610f6a16565b6006819055604080518481526020810184905280820192909252517f69155044ae1e4cf9acf985cae44e0d86b5e592e3fb029bc9b39f63b0bdaa4a629181900360600190a15050565b60075481565b61077f611006565b6000610789610e30565b600955610794610c19565b6008556001600160a01b038116156107db576107af81610371565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b600060065411610832576040805162461bcd60e51b815260206004820152601a60248201527f5265776172642052617465206973206e6f742079657420736574000000000000604482015290519081900360640190fd5b60055442106108575760065461084f90839063ffffffff610f6a16565b6007556108a6565b60055460009061086d904263ffffffff610ec816565b9050600061088660065483610f1190919063ffffffff16565b6006549091506108a0906103e9868463ffffffff610fac16565b60075550505b600c54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156108f157600080fd5b505afa158015610905573d6000803e3d6000fd5b505050506040513d602081101561091b57600080fd5b505160075490915061093490829063ffffffff610f6a16565b600654111561098a576040805162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b4260088190556007546109a3919063ffffffff610fac16565b6005556040805184815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1505050565b60026000541415610a36576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005533610a44610e30565b600955610a4f610c19565b6008556001600160a01b03811615610a9657610a6a81610371565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b336000908152600f60205260409020548015610b0c57336000818152600f6020526040812055600c54610ad5916001600160a01b03909116908361104f565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001600055565b6002546001600160a01b031681565b60045460ff1681565b6001600160a01b031660009081526010602052604090205490565b600d546001600160a01b031681565b6002546001600160a01b03163314610ba05760405162461bcd60e51b81526004018080602001828103825260358152602001806114546035913960400191505060405180910390fd5b600154600254604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160028054600180546001600160a01b03199081166001600160a01b03841617909155169055565b60065481565b6000610c27426005546110a6565b90505b90565b6001546001600160a01b031681565b600a5481565b60035481565b60026000541415610ca0576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005560045460ff1615610ce75760405162461bcd60e51b815260040180806020018281038252603c815260200180611559603c913960400191505060405180910390fd5b33610cf0610e30565b600955610cfb610c19565b6008556001600160a01b03811615610d4257610d1681610371565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b60008211610d88576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600b54610d9b908363ffffffff610fac16565b600b5533600090815260106020526040902054610dbe908363ffffffff610fac16565b33600081815260106020526040902091909155600d54610deb916001600160a01b039091169030856110bc565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001600055565b60085481565b6000600b5460001415610e465750600954610c2a565b610c27610e7b600b546103e9670de0b6b3a7640000610e6f600654610e6f6008546103b8610c19565b9063ffffffff610f1116565b6009549063ffffffff610fac16565b600c546001600160a01b031681565b60095481565b33600090815260106020526040902054610eb8906104e3565b610ec06109de565b565b60055481565b6000610f0a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061111c565b9392505050565b600082610f2057506000610401565b82820282848281610f2d57fe5b0414610f0a5760405162461bcd60e51b81526004018080602001828103825260218152602001806115386021913960400191505060405180910390fd5b6000610f0a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506111b3565b600082820183811015610f0a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001546001600160a01b03163314610ec05760405162461bcd60e51b815260040180806020018281038252602f815260200180611509602f913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110a1908490611218565b505050565b60008183106110b55781610f0a565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611116908590611218565b50505050565b600081848411156111ab5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611170578181015183820152602001611158565b50505050905090810190601f16801561119d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836112025760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611170578181015183820152602001611158565b50600083858161120e57fe5b0495945050505050565b606061126d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112c99092919063ffffffff16565b8051909150156110a15780806020019051602081101561128c57600080fd5b50516110a15760405162461bcd60e51b815260040180806020018281038252602a815260200180611595602a913960400191505060405180910390fd5b60606112d884846000856112e0565b949350505050565b60606112eb8561144d565b61133c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061137b5780518252601f19909201916020918201910161135c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146113dd576040519150601f19603f3d011682016040523d82523d6000602084013e6113e2565b606091505b509150915081156113f65791506112d89050565b8051156114065780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315611170578181015183820152602001611158565b3b15159056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697072657761726473506572496e74657276616c20616e6420696e74657276616c2073686f756c642062652067726561746572207468616e203050726576696f7573207265776172647320706572696f64206d75737420626520636f6d706c657465206265666f7265206368616e67696e67207468652072657761726420726174654f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e7472616374206973207061757365645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209721b1428a881bffdb5adc9a51c73ebedefc4023ffb159a40935ed0de0f5351b64736f6c63430006020033

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

0000000000000000000000001c77d6a40f9a193857df146a849fb49d184460cb00000000000000000000000016980b3b4a3f9d89e33311b5aa8f80303e5ca4f80000000000000000000000001bfffb738d69167d5592160a47d5404a3cf5a846

-----Decoded View---------------
Arg [0] : _owner (address): 0x1C77d6A40f9a193857df146a849fB49D184460Cb
Arg [1] : _rewardsToken (address): 0x16980b3B4a3f9D89E33311B5aa8f80303E5ca4F8
Arg [2] : _stakingToken (address): 0x1BfffB738D69167D5592160A47D5404A3cF5a846

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000001c77d6a40f9a193857df146a849fb49d184460cb
Arg [1] : 00000000000000000000000016980b3b4a3f9d89e33311b5aa8f80303e5ca4f8
Arg [2] : 0000000000000000000000001bfffb738d69167d5592160a47d5404a3cf5a846


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

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