ETH Price: $2,868.53 (-9.79%)
Gas: 15 Gwei

Contract

0xeB906A75838A8078B181815969b1DCBC20eaF7c0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Exit196651472024-04-16 2:43:4780 days ago1713235427IN
0xeB906A75...C20eaF7c0
0 ETH0.003605617.73580181
Get Reward189298952024-01-03 22:47:47183 days ago1704322067IN
0xeB906A75...C20eaF7c0
0 ETH0.0176098843.47003579
Exit184905192023-11-03 9:03:59244 days ago1699002239IN
0xeB906A75...C20eaF7c0
0 ETH0.0143891831.00482409
Exit182064792023-09-24 15:14:23284 days ago1695568463IN
0xeB906A75...C20eaF7c0
0 ETH0.000747958.05643496
Get Reward182064722023-09-24 15:12:59284 days ago1695568379IN
0xeB906A75...C20eaF7c0
0 ETH0.003635548.29658065
Get Reward177057322023-07-16 12:04:35354 days ago1689509075IN
0xeB906A75...C20eaF7c0
0 ETH0.0057700214.12822663
Exit174472412023-06-10 3:55:23391 days ago1686369323IN
0xeB906A75...C20eaF7c0
0 ETH0.0089956619.09522245
Exit174054532023-06-04 6:24:11397 days ago1685859851IN
0xeB906A75...C20eaF7c0
0 ETH0.0085477818.1444983
Withdraw172954502023-05-19 18:56:59412 days ago1684522619IN
0xeB906A75...C20eaF7c0
0 ETH0.0041362441.82843402
Exit171292412023-04-26 8:33:11435 days ago1682497991IN
0xeB906A75...C20eaF7c0
0 ETH0.0164232636.58550056
Withdraw171261372023-04-25 22:06:59436 days ago1682460419IN
0xeB906A75...C20eaF7c0
0 ETH0.0052399259.55403953
Withdraw171161642023-04-24 12:31:47437 days ago1682339507IN
0xeB906A75...C20eaF7c0
0 ETH0.0027299738.5121951
Get Reward171161482023-04-24 12:28:35437 days ago1682339315IN
0xeB906A75...C20eaF7c0
0 ETH0.0159021236.59042495
Withdraw171108612023-04-23 18:41:59438 days ago1682275319IN
0xeB906A75...C20eaF7c0
0 ETH0.0053124147.99540336
Withdraw171102312023-04-23 16:34:35438 days ago1682267675IN
0xeB906A75...C20eaF7c0
0 ETH0.0040104852.46715949
Withdraw170961662023-04-21 17:13:23440 days ago1682097203IN
0xeB906A75...C20eaF7c0
0 ETH0.0030150134.26699602
Stake170958892023-04-21 16:17:23440 days ago1682093843IN
0xeB906A75...C20eaF7c0
0 ETH0.0045365641.00370811
Withdraw170760782023-04-18 20:59:59443 days ago1681851599IN
0xeB906A75...C20eaF7c0
0 ETH0.0074179467.01794949
Withdraw170727752023-04-18 9:46:47443 days ago1681811207IN
0xeB906A75...C20eaF7c0
0 ETH0.0030178634.29472569
Withdraw170696352023-04-17 23:05:59444 days ago1681772759IN
0xeB906A75...C20eaF7c0
0 ETH0.0029537531.5740312
Withdraw170688492023-04-17 20:27:23444 days ago1681763243IN
0xeB906A75...C20eaF7c0
0 ETH0.0036792833.24797709
Withdraw170578022023-04-16 6:50:59446 days ago1681627859IN
0xeB906A75...C20eaF7c0
0 ETH0.0020808122.23422977
Withdraw170465932023-04-14 16:31:47447 days ago1681489907IN
0xeB906A75...C20eaF7c0
0 ETH0.0026437230.05526453
Stake170349622023-04-12 22:50:23449 days ago1681339823IN
0xeB906A75...C20eaF7c0
0 ETH0.0022618820.44849275
Withdraw170069462023-04-08 23:34:35453 days ago1680996875IN
0xeB906A75...C20eaF7c0
0 ETH0.0019229320.54721216
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Staking

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion, GNU GPLv3 license
File 1 of 13 : Staking.sol
/// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.15

pragma solidity ^0.8.15;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

import "../interfaces/IStaking.sol";
import "../interfaces/IRewardsEscrow.sol";

// https://docs.synthetix.io/contracts/source/contracts/stakingrewards
contract Staking is IStaking, Ownable, ReentrancyGuard, Pausable, ERC20 {
  using SafeERC20 for IERC20;

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

  IERC20 public rewardsToken;
  IERC20 public stakingToken;

  IRewardsEscrow public rewardsEscrow;
  uint256 public periodFinish = 0;
  uint256 public rewardRate = 0;
  uint256 public rewardsDuration = 7 days;
  uint256 public lastUpdateTime;
  uint256 public rewardPerTokenStored;

  // duration in seconds for rewards to be held in escrow
  uint256 public escrowDuration;

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

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

  constructor(
    IERC20 _rewardsToken,
    IERC20 _stakingToken,
    IRewardsEscrow _rewardsEscrow
  )
    ERC20(
      string(abi.encodePacked("Popcorn - ", IERC20Metadata(address(_stakingToken)).name(), " Staking")),
      string(abi.encodePacked("pop-st-", IERC20Metadata(address(_stakingToken)).symbol()))
    )
  {
    rewardsToken = _rewardsToken;
    stakingToken = _stakingToken;
    rewardsEscrow = _rewardsEscrow;

    rewardDistributors[msg.sender] = true;
    escrowDuration = 365 days;
    _rewardsToken.safeIncreaseAllowance(address(_rewardsEscrow), type(uint256).max);
  }

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

  function lastTimeRewardApplicable() public view override returns (uint256) {
    return block.timestamp < periodFinish ? block.timestamp : periodFinish;
  }

  function rewardPerToken() public view override returns (uint256) {
    if (totalSupply() == 0) {
      return rewardPerTokenStored;
    }
    return rewardPerTokenStored + (((lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * 1e18) / totalSupply());
  }

  function earned(address account) public view override returns (uint256) {
    return (balanceOf(account) * (rewardPerToken() - userRewardPerTokenPaid[account])) / 1e18 + rewards[account];
  }

  function getRewardForDuration() external view override returns (uint256) {
    return rewardRate * rewardsDuration;
  }

  function balanceOf(address account) public view override(IStaking, ERC20) returns (uint256) {
    return super.balanceOf(account);
  }

  function paused() public view override(IStaking, Pausable) returns (bool) {
    return super.paused();
  }

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

  function stakeFor(uint256 amount, address account) external {
    // QUESTION: Do we want to check allowances to stakeFor as with withdrawFor?
    // require(allowance(account, msg.sender) <= amount, "not approved to stake amount");
    _stake(amount, account);
  }

  function stake(uint256 amount) external override {
    _stake(amount, msg.sender);
  }

  function _stake(uint256 amount, address account) internal nonReentrant whenNotPaused updateReward(account) {
    require(amount > 0, "Cannot stake 0");
    _mint(account, amount);
    stakingToken.safeTransferFrom(msg.sender, address(this), amount);
    emit Staked(account, amount);
  }

  function withdrawFor(
    uint256 amount,
    address owner,
    address receiver
  ) external {
    _approve(owner, msg.sender, allowance(owner, msg.sender) - amount);
    _withdraw(amount, owner, receiver);
  }

  function withdraw(uint256 amount) external override {
    _withdraw(amount, msg.sender, msg.sender);
  }

  function _withdraw(
    uint256 amount,
    address owner,
    address receiver
  ) internal nonReentrant whenNotPaused updateReward(owner) {
    require(amount > 0, "Cannot withdraw 0");
    if (owner != receiver) _updateReward(receiver);

    _burn(owner, amount);
    stakingToken.safeTransfer(receiver, amount);
    emit Withdrawn(owner, amount);
  }

  function getReward() public override nonReentrant updateReward(msg.sender) {
    uint256 reward = rewards[msg.sender];
    if (reward > 0) {
      rewards[msg.sender] = 0;
      uint256 payout = reward / uint256(10);
      uint256 escrowed = payout * uint256(9);

      rewardsToken.safeTransfer(msg.sender, payout);
      rewardsEscrow.lock(msg.sender, escrowed, escrowDuration);
      emit RewardPaid(msg.sender, reward);
    }
  }

  function exit() external override {
    _withdraw(balanceOf(msg.sender), msg.sender, msg.sender);
    getReward();
  }

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

  function setEscrowDuration(uint256 duration) external onlyOwner {
    emit EscrowDurationUpdated(escrowDuration, duration);
    escrowDuration = duration;
  }

  function notifyRewardAmount(uint256 reward) external override updateReward(address(0)) {
    require(rewardDistributors[msg.sender], "not authorized");

    if (block.timestamp >= periodFinish) {
      rewardRate = reward / rewardsDuration;
    } else {
      uint256 remaining = periodFinish - block.timestamp;
      uint256 leftover = remaining * rewardRate;
      rewardRate = (reward + leftover) / rewardsDuration;
    }

    // handle the transfer of reward tokens via `transferFrom` to reduce the number
    // of transactions required and ensure correctness of the reward amount
    IERC20(rewardsToken).safeTransferFrom(msg.sender, address(this), reward);

    // 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 / rewardsDuration, "Provided reward too high");

    lastUpdateTime = block.timestamp;
    periodFinish = block.timestamp + rewardsDuration;

    emit RewardAdded(reward);
  }

  // Modify approval for an address to call notifyRewardAmount
  function approveRewardDistributor(address _distributor, bool _approved) external onlyOwner {
    emit RewardDistributorUpdated(_distributor, _approved);
    rewardDistributors[_distributor] = _approved;
  }

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

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

  function setRewardsEscrow(address _rewardsEscrow) external onlyOwner {
    emit RewardsEscrowUpdated(address(rewardsEscrow), _rewardsEscrow);
    rewardsEscrow = IRewardsEscrow(_rewardsEscrow);
  }

  /**
   * @notice Pause deposits. Caller must have VAULTS_CONTROLLER from ACLRegistry.
   */
  function pauseContract() external onlyOwner {
    _pause();
  }

  /**
   * @notice Unpause deposits. Caller must have VAULTS_CONTROLLER from ACLRegistry.
   */
  function unpauseContract() external onlyOwner {
    _unpause();
  }

  /* ========== ERC20 OVERRIDE ========== */

  error nonTransferable();

  function _transfer(
    address, /* from */
    address, /* to */
    uint256 /* amount */
  ) internal pure override(ERC20) {
    revert nonTransferable();
  }

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

  modifier updateReward(address account) {
    _updateReward(account);
    _;
  }

  function _updateReward(address account) internal {
    rewardPerTokenStored = rewardPerToken();
    lastUpdateTime = lastTimeRewardApplicable();
    if (account != address(0)) {
      rewards[account] = earned(account);
      userRewardPerTokenPaid[account] = rewardPerTokenStored;
    }
  }

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

  event RewardsEscrowUpdated(address _previous, address _new);
  event Recovered(address token, uint256 amount);
}

File 2 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 13 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

File 5 of 13 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 6 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 7 of 13 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 8 of 13 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 9 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

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

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 12 of 13 : IRewardsEscrow.sol
// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.0

pragma solidity >0.6.0;

interface IRewardsEscrow {
  function lock(
    address _address,
    uint256 _amount,
    uint256 duration
  ) external;

  function addAuthorizedContract(address _staking) external;

  function removeAuthorizedContract(address _staking) external;
}

File 13 of 13 : IStaking.sol
// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.0

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IStaking {
  event RewardAdded(uint256 reward);
  event Staked(address indexed user, uint256 amount);
  event Withdrawn(address indexed user, uint256 amount);
  event RewardPaid(address indexed user, uint256 reward);
  event RewardsDurationUpdated(uint256 newDuration);
  event EscrowDurationUpdated(uint256 _previousDuration, uint256 _newDuration);
  event RewardDistributorUpdated(address indexed distributor, bool approved);

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

  function lastTimeRewardApplicable() external view returns (uint256);

  function rewardPerToken() external view returns (uint256);

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

  function getRewardForDuration() external view returns (uint256);

  function stakingToken() external view returns (IERC20);

  function rewardsToken() external view returns (IERC20);

  function escrowDuration() external view returns (uint256);

  function rewardsDuration() external view returns (uint256);

  function paused() external view returns (bool);

  // Mutative
  function stake(uint256 amount) external;

  function stakeFor(uint256 amount, address account) external;

  function withdraw(uint256 amount) external;

  function withdrawFor(
    uint256 amount,
    address owner,
    address receiver
  ) external;

  function getReward() external;

  function exit() external;

  function notifyRewardAmount(uint256 reward) external;

  function setEscrowDuration(uint256 duration) external;

  function setRewardsDuration(uint256 duration) external;

  function pauseContract() external;

  function unpauseContract() external;
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_rewardsToken","type":"address"},{"internalType":"contract IERC20","name":"_stakingToken","type":"address"},{"internalType":"contract IRewardsEscrow","name":"_rewardsEscrow","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"nonTransferable","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_previousDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newDuration","type":"uint256"}],"name":"EscrowDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"distributor","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"RewardDistributorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_previous","type":"address"},{"indexed":false,"internalType":"address","name":"_new","type":"address"}],"name":"RewardsEscrowUpdated","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","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":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_distributor","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"approveRewardDistributor","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":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"escrowDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"pauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardDistributors","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","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":"rewardsEscrow","outputs":[{"internalType":"contract IRewardsEscrow","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setEscrowDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsEscrow","type":"address"}],"name":"setRewardsEscrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"receiver","type":"address"}],"name":"withdrawFor","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600b556000600c5562093a80600d553480156200002257600080fd5b50604051620028ad380380620028ad8339810160408190526200004591620005e1565b816001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000084573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620000ae919081019062000671565b604051602001620000c091906200071e565b604051602081830303815290604052826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200010e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000138919081019062000671565b6040516020016200014a919062000764565b60408051808303601f19018152919052620001653362000216565b600180556002805460ff19169055600662000181838262000823565b50600762000190828262000823565b5050600880546001600160a01b038087166001600160a01b0319928316811790935560098054878316908416179055600a805491861691909216179055336000908152601360209081526040909120805460ff191660011790556301e133806010556200020d925083906000199062000ff762000266821b17901c565b505050620009a8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015620002b8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002de9190620008ef565b620002ea919062000909565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b1790915291925062000346918691906200034c16565b50505050565b6000620003a8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200043360201b620010d4179092919060201c565b8051909150156200042e5780806020019051810190620003c9919062000931565b6200042e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b505050565b60606200044484846000856200044e565b90505b9392505050565b606082471015620004b15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000425565b6001600160a01b0385163b6200050a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000425565b600080866001600160a01b0316858760405162000528919062000955565b60006040518083038185875af1925050503d806000811462000567576040519150601f19603f3d011682016040523d82523d6000602084013e6200056c565b606091505b5090925090506200057f8282866200058a565b979650505050505050565b606083156200059b57508162000447565b825115620005ac5782518084602001fd5b8160405162461bcd60e51b815260040162000425919062000973565b6001600160a01b0381168114620005de57600080fd5b50565b600080600060608486031215620005f757600080fd5b83516200060481620005c8565b60208501519093506200061781620005c8565b60408501519092506200062a81620005c8565b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620006685781810151838201526020016200064e565b50506000910152565b6000602082840312156200068457600080fd5b81516001600160401b03808211156200069c57600080fd5b818401915084601f830112620006b157600080fd5b815181811115620006c657620006c662000635565b604051601f8201601f19908116603f01168101908382118183101715620006f157620006f162000635565b816040528281528760208487010111156200070b57600080fd5b6200057f8360208301602088016200064b565b6902837b831b7b9371016960b51b8152600082516200074581600a8501602087016200064b565b67205374616b696e6760c01b600a939091019283015250601201919050565b66706f702d73742d60c81b815260008251620007888160078501602087016200064b565b9190910160070192915050565b600181811c90821680620007aa57607f821691505b602082108103620007cb57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200042e57600081815260208120601f850160051c81016020861015620007fa5750805b601f850160051c820191505b818110156200081b5782815560010162000806565b505050505050565b81516001600160401b038111156200083f576200083f62000635565b620008578162000850845462000795565b84620007d1565b602080601f8311600181146200088f5760008415620008765750858301515b600019600386901b1c1916600185901b1785556200081b565b600085815260208120601f198616915b82811015620008c0578886015182559484019460019091019084016200089f565b5085821015620008df5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200090257600080fd5b5051919050565b808201808211156200092b57634e487b7160e01b600052601160045260246000fd5b92915050565b6000602082840312156200094457600080fd5b815180151581146200044757600080fd5b60008251620009698184602087016200064b565b9190910192915050565b6020815260008251806020840152620009948160408501602087016200064b565b601f01601f19169190910160400192915050565b611ef580620009b86000396000f3fe608060405234801561001057600080fd5b506004361061027e5760003560e01c806372f702f31161015c578063b33712c5116100ce578063df136d6511610087578063df136d651461052a578063e465fe8014610533578063e9fad8ee14610546578063ebe2b12b1461054e578063f215793214610557578063f2fde38b1461056a57600080fd5b8063b33712c5146104d8578063c8f33c91146104e0578063cc1a378f146104e9578063cd3daf9d146104fc578063d1af0c7d14610504578063dd62ed3e1461051757600080fd5b80638da5cb5b116101205780638da5cb5b1461046357806395d89b4114610474578063a457c2d71461047c578063a694fc3a1461048f578063a9059cbb146104a2578063a9c12f0c146104b557600080fd5b806372f702f3146103ff5780637b0a47ee1461041f57806380faa57d146104285780638980f11f146104305780638b8763471461044357600080fd5b806339509351116101f557806351746bb2116101b957806351746bb2146103ad57806356c90955146103c057806357c2c2ba146103d35780635c975abb146103dc57806370a08231146103e4578063715018a6146103f757600080fd5b806339509351146103645780633c6b16ab146103775780633d18b9121461038a578063439766ce146103925780634fb15b3f1461039a57600080fd5b80631c1f78eb116102475780631c1f78eb1461030957806323b872dd146103115780632e1a7d4d14610324578063313ce56714610339578063321bc34714610348578063386a95251461035b57600080fd5b80628cc2621461028357806306fdde03146102a95780630700037d146102be578063095ea7b3146102de57806318160ddd14610301575b600080fd5b610296610291366004611b92565b61057d565b6040519081526020015b60405180910390f35b6102b16105ea565b6040516102a09190611bd1565b6102966102cc366004611b92565b60126020526000908152604090205481565b6102f16102ec366004611c04565b61067c565b60405190151581526020016102a0565b600554610296565b610296610694565b6102f161031f366004611c2e565b6106ab565b610337610332366004611c6a565b6106d1565b005b604051601281526020016102a0565b610337610356366004611c6a565b6106df565b610296600d5481565b6102f1610372366004611c04565b610728565b610337610385366004611c6a565b61074a565b61033761093d565b610337610a79565b6103376103a8366004611c83565b610a8b565b6103376103bb366004611cbf565b610ab5565b6103376103ce366004611cf9565b610ac3565b61029660105481565b6102f1610b3b565b6102966103f2366004611b92565b610b49565b610337610b67565b600954610412906001600160a01b031681565b6040516102a09190611d30565b610296600c5481565b610296610b79565b61033761043e366004611c04565b610b90565b610296610451366004611b92565b60116020526000908152604090205481565b6000546001600160a01b0316610412565b6102b1610ccb565b6102f161048a366004611c04565b610cda565b61033761049d366004611c6a565b610d60565b6102f16104b0366004611c04565b610d6a565b6102f16104c3366004611b92565b60136020526000908152604090205460ff1681565b610337610d78565b610296600e5481565b6103376104f7366004611c6a565b610d88565b610296610e63565b600854610412906001600160a01b031681565b610296610525366004611d44565b610eca565b610296600f5481565b610337610541366004611b92565b610ef5565b610337610f66565b610296600b5481565b600a54610412906001600160a01b031681565b610337610578366004611b92565b610f81565b6001600160a01b0381166000908152601260209081526040808320546011909252822054670de0b6b3a7640000906105b3610e63565b6105bd9190611d84565b6105c685610b49565b6105d09190611d97565b6105da9190611dae565b6105e49190611dd0565b92915050565b6060600680546105f990611de3565b80601f016020809104026020016040519081016040528092919081815260200182805461062590611de3565b80156106725780601f1061064757610100808354040283529160200191610672565b820191906000526020600020905b81548152906001019060200180831161065557829003601f168201915b5050505050905090565b60003361068a8185856110eb565b5060019392505050565b6000600d54600c546106a69190611d97565b905090565b6000336106b985828561120f565b6106c4858585611283565b60019150505b9392505050565b6106dc81333361129b565b50565b6106e76113a8565b60105460408051918252602082018390527f21c46a061cb9c101660f51f5c9fc9768c5f6e8cf5dea8ca5cd03cb6db13956f3910160405180910390a1601055565b60003361068a81858561073b8383610eca565b6107459190611dd0565b6110eb565b600061075581611402565b3360009081526013602052604090205460ff166107aa5760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b60448201526064015b60405180910390fd5b600b5442106107c857600d546107c09083611dae565b600c5561080a565b600042600b546107d89190611d84565b90506000600c54826107ea9190611d97565b600d549091506107fa8286611dd0565b6108049190611dae565b600c5550505b600854610822906001600160a01b031633308561145e565b6008546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610853903090600401611d30565b602060405180830381865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190611e1d565b9050600d54816108a49190611dae565b600c5411156108f05760405162461bcd60e51b81526020600482015260186024820152770a0e4deecd2c8cac840e4caeec2e4c840e8dede40d0d2ced60431b60448201526064016107a1565b42600e819055600d5461090291611dd0565b600b556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050565b60026001540361095f5760405162461bcd60e51b81526004016107a190611e36565b60026001553361096e81611402565b336000908152601260205260409020548015610a71573360009081526012602052604081208190556109a1600a83611dae565b905060006109b0600983611d97565b6008549091506109ca906001600160a01b03163384611496565b600a5460105460405163e2ab691d60e01b81523360048201526024810184905260448101919091526001600160a01b039091169063e2ab691d90606401600060405180830381600087803b158015610a2157600080fd5b505af1158015610a35573d6000803e3d6000fd5b50506040518581523392507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486915060200160405180910390a250505b505060018055565b610a816113a8565b610a896114b5565b565b610aa5823385610a9b8633610eca565b6107459190611d84565b610ab083838361129b565b505050565b610abf8282611509565b5050565b610acb6113a8565b816001600160a01b03167fa852210219105cdf51ee9a33c11dd3d37ec6ea85e55ecff0b25dec123a05667a82604051610b08911515815260200190565b60405180910390a26001600160a01b03919091166000908152601360205260409020805460ff1916911515919091179055565b60006106a660025460ff1690565b6001600160a01b0381166000908152600360205260408120546105e4565b610b6f6113a8565b610a8960006115f1565b6000600b544210610b8b5750600b5490565b504290565b610b986113a8565b6009546001600160a01b0390811690831603610c005760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656044820152603760f91b60648201526084016107a1565b6008546001600160a01b0390811690831603610c685760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207265776172647320746f6b656044820152603760f91b60648201526084016107a1565b610c8e610c7d6000546001600160a01b031690565b6001600160a01b0384169083611496565b7f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa288282604051610cbf929190611e6d565b60405180910390a15050565b6060600780546105f990611de3565b60003381610ce88286610eca565b905083811015610d485760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016107a1565b610d5582868684036110eb565b506001949350505050565b6106dc8133611509565b60003361068a818585611283565b610d806113a8565b610a89611641565b610d906113a8565b600b544211610e285760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e672074686520647572606482015277185d1a5bdb88199bdc881d1a19481b995dc81c195c9a5bd960421b608482015260a4016107a1565b600d8190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39060200160405180910390a150565b6000610e6e60055490565b600003610e7c5750600f5490565b600554600c54600e54610e8d610b79565b610e979190611d84565b610ea19190611d97565b610eb390670de0b6b3a7640000611d97565b610ebd9190611dae565b600f546106a69190611dd0565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b610efd6113a8565b600a54604080516001600160a01b03928316815291831660208301527fee4ec82b92f0e1fe230e6604a4752fa407a28069f106dc41e53edc28c4bc504e910160405180910390a1600a80546001600160a01b0319166001600160a01b0392909216919091179055565b610f79610f7233610b49565b333361129b565b610a8961093d565b610f896113a8565b6001600160a01b038116610fee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107a1565b6106dc816115f1565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015611048573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106c9190611e1d565b6110769190611dd0565b90506110ce8463095ea7b360e01b8584604051602401611097929190611e6d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261167a565b50505050565b60606110e3848460008561174c565b949350505050565b6001600160a01b03831661114d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107a1565b6001600160a01b0382166111ae5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107a1565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061121b8484610eca565b905060001981146110ce57818110156112765760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016107a1565b6110ce84848484036110eb565b604051627d216160e91b815260040160405180910390fd5b6002600154036112bd5760405162461bcd60e51b81526004016107a190611e36565b60026001556112ca61187d565b816112d481611402565b600084116113185760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b60448201526064016107a1565b816001600160a01b0316836001600160a01b03161461133a5761133a82611402565b61134483856118c5565b60095461135b906001600160a01b03168386611496565b826001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58560405161139691815260200190565b60405180910390a25050600180555050565b6000546001600160a01b03163314610a895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107a1565b61140a610e63565b600f55611415610b79565b600e556001600160a01b038116156106dc576114308161057d565b6001600160a01b038216600090815260126020908152604080832093909355600f5460119091529190205550565b6040516001600160a01b03808516602483015283166044820152606481018290526110ce9085906323b872dd60e01b90608401611097565b610ab08363a9059cbb60e01b8484604051602401611097929190611e6d565b6114bd61187d565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114f23390565b6040516114ff9190611d30565b60405180910390a1565b60026001540361152b5760405162461bcd60e51b81526004016107a190611e36565b600260015561153861187d565b8061154281611402565b600083116115835760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b60448201526064016107a1565b61158d8284611a13565b6009546115a5906001600160a01b031633308661145e565b816001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d846040516115e091815260200190565b60405180910390a250506001805550565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611649611af2565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336114f2565b60006116cf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110d49092919063ffffffff16565b805190915015610ab057808060200190518101906116ed9190611e86565b610ab05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107a1565b6060824710156117ad5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107a1565b6001600160a01b0385163b6118045760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107a1565b600080866001600160a01b031685876040516118209190611ea3565b60006040518083038185875af1925050503d806000811461185d576040519150601f19603f3d011682016040523d82523d6000602084013e611862565b606091505b5091509150611872828286611b3d565b979650505050505050565b611885610b3b565b15610a895760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016107a1565b6001600160a01b0382166119255760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107a1565b6001600160a01b038216600090815260036020526040902054818110156119995760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107a1565b6001600160a01b03831660009081526003602052604081208383039055600580548492906119c8908490611d84565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b038216611a695760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107a1565b8060056000828254611a7b9190611dd0565b90915550506001600160a01b03821660009081526003602052604081208054839290611aa8908490611dd0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b611afa610b3b565b610a895760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016107a1565b60608315611b4c5750816106ca565b825115611b5c5782518084602001fd5b8160405162461bcd60e51b81526004016107a19190611bd1565b80356001600160a01b0381168114611b8d57600080fd5b919050565b600060208284031215611ba457600080fd5b6106ca82611b76565b60005b83811015611bc8578181015183820152602001611bb0565b50506000910152565b6020815260008251806020840152611bf0816040850160208701611bad565b601f01601f19169190910160400192915050565b60008060408385031215611c1757600080fd5b611c2083611b76565b946020939093013593505050565b600080600060608486031215611c4357600080fd5b611c4c84611b76565b9250611c5a60208501611b76565b9150604084013590509250925092565b600060208284031215611c7c57600080fd5b5035919050565b600080600060608486031215611c9857600080fd5b83359250611ca860208501611b76565b9150611cb660408501611b76565b90509250925092565b60008060408385031215611cd257600080fd5b82359150611ce260208401611b76565b90509250929050565b80151581146106dc57600080fd5b60008060408385031215611d0c57600080fd5b611d1583611b76565b91506020830135611d2581611ceb565b809150509250929050565b6001600160a01b0391909116815260200190565b60008060408385031215611d5757600080fd5b611d6083611b76565b9150611ce260208401611b76565b634e487b7160e01b600052601160045260246000fd5b818103818111156105e4576105e4611d6e565b80820281158282048414176105e4576105e4611d6e565b600082611dcb57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156105e4576105e4611d6e565b600181811c90821680611df757607f821691505b602082108103611e1757634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611e2f57600080fd5b5051919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6001600160a01b03929092168252602082015260400190565b600060208284031215611e9857600080fd5b81516106ca81611ceb565b60008251611eb5818460208701611bad565b919091019291505056fea2646970667358221220f5ed316ab356ddcf92e627a80b7e80753ac196bd124a1c31bffa90d72d26603364736f6c63430008110033000000000000000000000000d0cd466b34a24fcb2f87676278af2005ca8a78c400000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb8000000000000000000000000b5cb5710044d1074097c17b7535a1cf99cbfb17f

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061027e5760003560e01c806372f702f31161015c578063b33712c5116100ce578063df136d6511610087578063df136d651461052a578063e465fe8014610533578063e9fad8ee14610546578063ebe2b12b1461054e578063f215793214610557578063f2fde38b1461056a57600080fd5b8063b33712c5146104d8578063c8f33c91146104e0578063cc1a378f146104e9578063cd3daf9d146104fc578063d1af0c7d14610504578063dd62ed3e1461051757600080fd5b80638da5cb5b116101205780638da5cb5b1461046357806395d89b4114610474578063a457c2d71461047c578063a694fc3a1461048f578063a9059cbb146104a2578063a9c12f0c146104b557600080fd5b806372f702f3146103ff5780637b0a47ee1461041f57806380faa57d146104285780638980f11f146104305780638b8763471461044357600080fd5b806339509351116101f557806351746bb2116101b957806351746bb2146103ad57806356c90955146103c057806357c2c2ba146103d35780635c975abb146103dc57806370a08231146103e4578063715018a6146103f757600080fd5b806339509351146103645780633c6b16ab146103775780633d18b9121461038a578063439766ce146103925780634fb15b3f1461039a57600080fd5b80631c1f78eb116102475780631c1f78eb1461030957806323b872dd146103115780632e1a7d4d14610324578063313ce56714610339578063321bc34714610348578063386a95251461035b57600080fd5b80628cc2621461028357806306fdde03146102a95780630700037d146102be578063095ea7b3146102de57806318160ddd14610301575b600080fd5b610296610291366004611b92565b61057d565b6040519081526020015b60405180910390f35b6102b16105ea565b6040516102a09190611bd1565b6102966102cc366004611b92565b60126020526000908152604090205481565b6102f16102ec366004611c04565b61067c565b60405190151581526020016102a0565b600554610296565b610296610694565b6102f161031f366004611c2e565b6106ab565b610337610332366004611c6a565b6106d1565b005b604051601281526020016102a0565b610337610356366004611c6a565b6106df565b610296600d5481565b6102f1610372366004611c04565b610728565b610337610385366004611c6a565b61074a565b61033761093d565b610337610a79565b6103376103a8366004611c83565b610a8b565b6103376103bb366004611cbf565b610ab5565b6103376103ce366004611cf9565b610ac3565b61029660105481565b6102f1610b3b565b6102966103f2366004611b92565b610b49565b610337610b67565b600954610412906001600160a01b031681565b6040516102a09190611d30565b610296600c5481565b610296610b79565b61033761043e366004611c04565b610b90565b610296610451366004611b92565b60116020526000908152604090205481565b6000546001600160a01b0316610412565b6102b1610ccb565b6102f161048a366004611c04565b610cda565b61033761049d366004611c6a565b610d60565b6102f16104b0366004611c04565b610d6a565b6102f16104c3366004611b92565b60136020526000908152604090205460ff1681565b610337610d78565b610296600e5481565b6103376104f7366004611c6a565b610d88565b610296610e63565b600854610412906001600160a01b031681565b610296610525366004611d44565b610eca565b610296600f5481565b610337610541366004611b92565b610ef5565b610337610f66565b610296600b5481565b600a54610412906001600160a01b031681565b610337610578366004611b92565b610f81565b6001600160a01b0381166000908152601260209081526040808320546011909252822054670de0b6b3a7640000906105b3610e63565b6105bd9190611d84565b6105c685610b49565b6105d09190611d97565b6105da9190611dae565b6105e49190611dd0565b92915050565b6060600680546105f990611de3565b80601f016020809104026020016040519081016040528092919081815260200182805461062590611de3565b80156106725780601f1061064757610100808354040283529160200191610672565b820191906000526020600020905b81548152906001019060200180831161065557829003601f168201915b5050505050905090565b60003361068a8185856110eb565b5060019392505050565b6000600d54600c546106a69190611d97565b905090565b6000336106b985828561120f565b6106c4858585611283565b60019150505b9392505050565b6106dc81333361129b565b50565b6106e76113a8565b60105460408051918252602082018390527f21c46a061cb9c101660f51f5c9fc9768c5f6e8cf5dea8ca5cd03cb6db13956f3910160405180910390a1601055565b60003361068a81858561073b8383610eca565b6107459190611dd0565b6110eb565b600061075581611402565b3360009081526013602052604090205460ff166107aa5760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b60448201526064015b60405180910390fd5b600b5442106107c857600d546107c09083611dae565b600c5561080a565b600042600b546107d89190611d84565b90506000600c54826107ea9190611d97565b600d549091506107fa8286611dd0565b6108049190611dae565b600c5550505b600854610822906001600160a01b031633308561145e565b6008546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610853903090600401611d30565b602060405180830381865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190611e1d565b9050600d54816108a49190611dae565b600c5411156108f05760405162461bcd60e51b81526020600482015260186024820152770a0e4deecd2c8cac840e4caeec2e4c840e8dede40d0d2ced60431b60448201526064016107a1565b42600e819055600d5461090291611dd0565b600b556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050565b60026001540361095f5760405162461bcd60e51b81526004016107a190611e36565b60026001553361096e81611402565b336000908152601260205260409020548015610a71573360009081526012602052604081208190556109a1600a83611dae565b905060006109b0600983611d97565b6008549091506109ca906001600160a01b03163384611496565b600a5460105460405163e2ab691d60e01b81523360048201526024810184905260448101919091526001600160a01b039091169063e2ab691d90606401600060405180830381600087803b158015610a2157600080fd5b505af1158015610a35573d6000803e3d6000fd5b50506040518581523392507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486915060200160405180910390a250505b505060018055565b610a816113a8565b610a896114b5565b565b610aa5823385610a9b8633610eca565b6107459190611d84565b610ab083838361129b565b505050565b610abf8282611509565b5050565b610acb6113a8565b816001600160a01b03167fa852210219105cdf51ee9a33c11dd3d37ec6ea85e55ecff0b25dec123a05667a82604051610b08911515815260200190565b60405180910390a26001600160a01b03919091166000908152601360205260409020805460ff1916911515919091179055565b60006106a660025460ff1690565b6001600160a01b0381166000908152600360205260408120546105e4565b610b6f6113a8565b610a8960006115f1565b6000600b544210610b8b5750600b5490565b504290565b610b986113a8565b6009546001600160a01b0390811690831603610c005760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656044820152603760f91b60648201526084016107a1565b6008546001600160a01b0390811690831603610c685760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207265776172647320746f6b656044820152603760f91b60648201526084016107a1565b610c8e610c7d6000546001600160a01b031690565b6001600160a01b0384169083611496565b7f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa288282604051610cbf929190611e6d565b60405180910390a15050565b6060600780546105f990611de3565b60003381610ce88286610eca565b905083811015610d485760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016107a1565b610d5582868684036110eb565b506001949350505050565b6106dc8133611509565b60003361068a818585611283565b610d806113a8565b610a89611641565b610d906113a8565b600b544211610e285760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e672074686520647572606482015277185d1a5bdb88199bdc881d1a19481b995dc81c195c9a5bd960421b608482015260a4016107a1565b600d8190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39060200160405180910390a150565b6000610e6e60055490565b600003610e7c5750600f5490565b600554600c54600e54610e8d610b79565b610e979190611d84565b610ea19190611d97565b610eb390670de0b6b3a7640000611d97565b610ebd9190611dae565b600f546106a69190611dd0565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b610efd6113a8565b600a54604080516001600160a01b03928316815291831660208301527fee4ec82b92f0e1fe230e6604a4752fa407a28069f106dc41e53edc28c4bc504e910160405180910390a1600a80546001600160a01b0319166001600160a01b0392909216919091179055565b610f79610f7233610b49565b333361129b565b610a8961093d565b610f896113a8565b6001600160a01b038116610fee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107a1565b6106dc816115f1565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015611048573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106c9190611e1d565b6110769190611dd0565b90506110ce8463095ea7b360e01b8584604051602401611097929190611e6d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261167a565b50505050565b60606110e3848460008561174c565b949350505050565b6001600160a01b03831661114d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107a1565b6001600160a01b0382166111ae5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107a1565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061121b8484610eca565b905060001981146110ce57818110156112765760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016107a1565b6110ce84848484036110eb565b604051627d216160e91b815260040160405180910390fd5b6002600154036112bd5760405162461bcd60e51b81526004016107a190611e36565b60026001556112ca61187d565b816112d481611402565b600084116113185760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b60448201526064016107a1565b816001600160a01b0316836001600160a01b03161461133a5761133a82611402565b61134483856118c5565b60095461135b906001600160a01b03168386611496565b826001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58560405161139691815260200190565b60405180910390a25050600180555050565b6000546001600160a01b03163314610a895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107a1565b61140a610e63565b600f55611415610b79565b600e556001600160a01b038116156106dc576114308161057d565b6001600160a01b038216600090815260126020908152604080832093909355600f5460119091529190205550565b6040516001600160a01b03808516602483015283166044820152606481018290526110ce9085906323b872dd60e01b90608401611097565b610ab08363a9059cbb60e01b8484604051602401611097929190611e6d565b6114bd61187d565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114f23390565b6040516114ff9190611d30565b60405180910390a1565b60026001540361152b5760405162461bcd60e51b81526004016107a190611e36565b600260015561153861187d565b8061154281611402565b600083116115835760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b60448201526064016107a1565b61158d8284611a13565b6009546115a5906001600160a01b031633308661145e565b816001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d846040516115e091815260200190565b60405180910390a250506001805550565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611649611af2565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336114f2565b60006116cf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110d49092919063ffffffff16565b805190915015610ab057808060200190518101906116ed9190611e86565b610ab05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107a1565b6060824710156117ad5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107a1565b6001600160a01b0385163b6118045760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107a1565b600080866001600160a01b031685876040516118209190611ea3565b60006040518083038185875af1925050503d806000811461185d576040519150601f19603f3d011682016040523d82523d6000602084013e611862565b606091505b5091509150611872828286611b3d565b979650505050505050565b611885610b3b565b15610a895760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016107a1565b6001600160a01b0382166119255760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107a1565b6001600160a01b038216600090815260036020526040902054818110156119995760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107a1565b6001600160a01b03831660009081526003602052604081208383039055600580548492906119c8908490611d84565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b038216611a695760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107a1565b8060056000828254611a7b9190611dd0565b90915550506001600160a01b03821660009081526003602052604081208054839290611aa8908490611dd0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b611afa610b3b565b610a895760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016107a1565b60608315611b4c5750816106ca565b825115611b5c5782518084602001fd5b8160405162461bcd60e51b81526004016107a19190611bd1565b80356001600160a01b0381168114611b8d57600080fd5b919050565b600060208284031215611ba457600080fd5b6106ca82611b76565b60005b83811015611bc8578181015183820152602001611bb0565b50506000910152565b6020815260008251806020840152611bf0816040850160208701611bad565b601f01601f19169190910160400192915050565b60008060408385031215611c1757600080fd5b611c2083611b76565b946020939093013593505050565b600080600060608486031215611c4357600080fd5b611c4c84611b76565b9250611c5a60208501611b76565b9150604084013590509250925092565b600060208284031215611c7c57600080fd5b5035919050565b600080600060608486031215611c9857600080fd5b83359250611ca860208501611b76565b9150611cb660408501611b76565b90509250925092565b60008060408385031215611cd257600080fd5b82359150611ce260208401611b76565b90509250929050565b80151581146106dc57600080fd5b60008060408385031215611d0c57600080fd5b611d1583611b76565b91506020830135611d2581611ceb565b809150509250929050565b6001600160a01b0391909116815260200190565b60008060408385031215611d5757600080fd5b611d6083611b76565b9150611ce260208401611b76565b634e487b7160e01b600052601160045260246000fd5b818103818111156105e4576105e4611d6e565b80820281158282048414176105e4576105e4611d6e565b600082611dcb57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156105e4576105e4611d6e565b600181811c90821680611df757607f821691505b602082108103611e1757634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611e2f57600080fd5b5051919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6001600160a01b03929092168252602082015260400190565b600060208284031215611e9857600080fd5b81516106ca81611ceb565b60008251611eb5818460208701611bad565b919091019291505056fea2646970667358221220f5ed316ab356ddcf92e627a80b7e80753ac196bd124a1c31bffa90d72d26603364736f6c63430008110033

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

000000000000000000000000d0cd466b34a24fcb2f87676278af2005ca8a78c400000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb8000000000000000000000000b5cb5710044d1074097c17b7535a1cf99cbfb17f

-----Decoded View---------------
Arg [0] : _rewardsToken (address): 0xD0Cd466b34A24fcB2f87676278AF2005Ca8A78c4
Arg [1] : _stakingToken (address): 0x06450dEe7FD2Fb8E39061434BAbCFC05599a6Fb8
Arg [2] : _rewardsEscrow (address): 0xb5cb5710044D1074097c17B7535a1cF99cBfb17F

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d0cd466b34a24fcb2f87676278af2005ca8a78c4
Arg [1] : 00000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb8
Arg [2] : 000000000000000000000000b5cb5710044d1074097c17b7535a1cf99cbfb17f


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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