ETH Price: $3,179.27 (-3.25%)

Contract

0x946f2Faa822b4e7C9eEeda101d46Bfaeb8132FD8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake161483772022-12-09 16:36:35704 days ago1670603795IN
0x946f2Faa...eb8132FD8
0 ETH0.03254452180.63331369
Withdraw114056432020-12-07 12:23:191436 days ago1607343799IN
0x946f2Faa...eb8132FD8
0 ETH0.0009101432
Unstake113709592020-12-02 4:43:251442 days ago1606884205IN
0x946f2Faa...eb8132FD8
0 ETH0.0044884628.5
Unstake112765302020-11-17 16:29:311456 days ago1605630571IN
0x946f2Faa...eb8132FD8
0 ETH0.01811135115
Unstake112732872020-11-17 4:39:351457 days ago1605587975IN
0x946f2Faa...eb8132FD8
0 ETH0.007123950
Unstake112720482020-11-17 0:02:411457 days ago1605571361IN
0x946f2Faa...eb8132FD8
0 ETH0.0045592932
Unstake112710402020-11-16 20:20:071457 days ago1605558007IN
0x946f2Faa...eb8132FD8
0 ETH0.0038631827
Stake112710202020-11-16 20:16:021457 days ago1605557762IN
0x946f2Faa...eb8132FD8
0 ETH0.0053883927
Unstake112669922020-11-16 5:19:401458 days ago1605503980IN
0x946f2Faa...eb8132FD8
0 ETH0.0028348218
Unstake112650532020-11-15 21:59:371458 days ago1605477577IN
0x946f2Faa...eb8132FD8
0 ETH0.0021460315
Unstake112631242020-11-15 15:12:401458 days ago1605453160IN
0x946f2Faa...eb8132FD8
0 ETH0.0052935537
Unstake112629402020-11-15 14:27:291458 days ago1605450449IN
0x946f2Faa...eb8132FD8
0 ETH0.0085841460
Unstake112605202020-11-15 5:29:381459 days ago1605418178IN
0x946f2Faa...eb8132FD8
0 ETH0.0036156919.8
Unstake112583572020-11-14 21:45:421459 days ago1605390342IN
0x946f2Faa...eb8132FD8
0 ETH0.001874213.1
Unstake112572482020-11-14 17:46:441459 days ago1605376004IN
0x946f2Faa...eb8132FD8
0 ETH0.0047021733
Unstake112553662020-11-14 10:46:411460 days ago1605350801IN
0x946f2Faa...eb8132FD8
0 ETH0.0033230321.1
Unstake112550182020-11-14 9:25:091460 days ago1605345909IN
0x946f2Faa...eb8132FD8
0 ETH0.0019314313.5
Unstake112539312020-11-14 5:25:501460 days ago1605331550IN
0x946f2Faa...eb8132FD8
0 ETH0.0017848614
Unstake112537632020-11-14 4:50:291460 days ago1605329429IN
0x946f2Faa...eb8132FD8
0 ETH0.0034197624
Stake112514442020-11-13 20:12:521460 days ago1605298372IN
0x946f2Faa...eb8132FD8
0 ETH0.0041907121.00000145
Unstake112508492020-11-13 18:01:371460 days ago1605290497IN
0x946f2Faa...eb8132FD8
0 ETH0.0032017225
Unstake112503222020-11-13 16:06:131460 days ago1605283573IN
0x946f2Faa...eb8132FD8
0 ETH0.0120177984
Stake112479442020-11-13 7:15:511461 days ago1605251751IN
0x946f2Faa...eb8132FD8
0 ETH0.0053639525
Unstake112472952020-11-13 4:54:261461 days ago1605243266IN
0x946f2Faa...eb8132FD8
0 ETH0.0036205725
Stake112472772020-11-13 4:51:151461 days ago1605243075IN
0x946f2Faa...eb8132FD8
0 ETH0.0033924817
View all transactions

Latest 4 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
111439732020-10-28 8:10:591477 days ago1603872659
0x946f2Faa...eb8132FD8
 Contract Creation0 ETH
111439732020-10-28 8:10:591477 days ago1603872659
0x946f2Faa...eb8132FD8
 Contract Creation0 ETH
111439732020-10-28 8:10:591477 days ago1603872659
0x946f2Faa...eb8132FD8
 Contract Creation0 ETH
111439732020-10-28 8:10:591477 days ago1603872659  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Geyser

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

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



pragma solidity ^0.6.0;

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

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

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

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

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

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

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

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

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



pragma solidity ^0.6.2;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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



pragma solidity ^0.6.0;




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

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/GSN/Context.sol



pragma solidity ^0.6.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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol



pragma solidity ^0.6.0;

/**
 * @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.
 */
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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

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



pragma solidity ^0.6.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].
 */
contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

// File: contracts/IStaking.sol

/*
Staking interface

EIP-900 staking interface

https://github.com/gysr-io/core

h/t https://github.com/ethereum/EIPs/blob/master/EIPS/eip-900.md


*/

pragma solidity ^0.6.12;

interface IStaking {
    // events
    event Staked(
        address indexed user,
        uint256 amount,
        uint256 total,
        bytes data
    );
    event Unstaked(
        address indexed user,
        uint256 amount,
        uint256 total,
        bytes data
    );

    /**
     * @notice stakes a certain amount of tokens, transferring this amount from
     the user to the contract
     * @param amount number of tokens to stake
     */
    function stake(uint256 amount, bytes calldata) external;

    /**
     * @notice stakes a certain amount of tokens for an address, transfering this
     amount from the caller to the contract, on behalf of the specified address
     * @param user beneficiary address
     * @param amount number of tokens to stake
     */
    function stakeFor(
        address user,
        uint256 amount,
        bytes calldata
    ) external;

    /**
     * @notice unstakes a certain amount of tokens, returning these tokens
     to the user
     * @param amount number of tokens to unstake
     */
    function unstake(uint256 amount, bytes calldata) external;

    /**
     * @param addr the address of interest
     * @return the current total of tokens staked for an address
     */
    function totalStakedFor(address addr) external view returns (uint256);

    /**
     * @return the current total amount of tokens staked by all users
     */
    function totalStaked() external view returns (uint256);

    /**
     * @return the staking token for this staking contract
     */
    function token() external view returns (address);

    /**
     * @return true if the staking contract support history
     */
    function supportsHistory() external pure returns (bool);
}

// File: contracts/IGeyser.sol

/*
Geyser interface

This defines the core Geyser contract interface as an extension to the
standard IStaking interface

https://github.com/gysr-io/core


*/

pragma solidity ^0.6.12;




/**
 * @title Geyser interface
 */
abstract contract IGeyser is IStaking, Ownable {
    // events
    event RewardsDistributed(address indexed user, uint256 amount);
    event RewardsFunded(
        uint256 amount,
        uint256 duration,
        uint256 start,
        uint256 total
    );
    event RewardsUnlocked(uint256 amount, uint256 total);
    event RewardsExpired(uint256 amount, uint256 duration, uint256 start);
    event GysrSpent(address indexed user, uint256 amount);
    event GysrWithdrawn(uint256 amount);

    // IStaking
    /**
     * @notice no support for history
     * @return false
     */
    function supportsHistory() external override pure returns (bool) {
        return false;
    }

    // IGeyser
    /**
     * @return staking token for this Geyser
     */
    function stakingToken() external virtual view returns (address);

    /**
     * @return reward token for this Geyser
     */
    function rewardToken() external virtual view returns (address);

    /**
     * @notice fund Geyser by locking up reward tokens for distribution
     * @param amount number of reward tokens to lock up as funding
     * @param duration period (seconds) over which funding will be unlocked
     */
    function fund(uint256 amount, uint256 duration) external virtual;

    /**
     * @notice fund Geyser by locking up reward tokens for future distribution
     * @param amount number of reward tokens to lock up as funding
     * @param duration period (seconds) over which funding will be unlocked
     * @param start time (seconds) at which funding begins to unlock
     */
    function fund(
        uint256 amount,
        uint256 duration,
        uint256 start
    ) external virtual;

    /**
     * @notice withdraw GYSR tokens applied during unstaking
     * @param amount number of GYSR to withdraw
     */
    function withdraw(uint256 amount) external virtual;

    /**
     * @notice unstake while applying GYSR token for boosted rewards
     * @param amount number of tokens to unstake
     * @param gysr number of GYSR tokens to apply for boost
     */
    function unstake(
        uint256 amount,
        uint256 gysr,
        bytes calldata
    ) external virtual;

    /**
     * @notice update accounting, unlock tokens, etc.
     */
    function update() external virtual;

    /**
     * @notice clean geyser, expire old fundings, etc.
     */
    function clean() external virtual;
}

// File: contracts/GeyserPool.sol

/*
Geyser token pool

Simple contract to implement token pool of arbitrary ERC20 token.
This is owned and used by a parent Geyser

https://github.com/gysr-io/core

h/t https://github.com/ampleforth/token-geyser


*/

pragma solidity ^0.6.12;




contract GeyserPool is Ownable {
    using SafeERC20 for IERC20;

    IERC20 public token;

    constructor(address token_) public {
        token = IERC20(token_);
    }

    function balance() public view returns (uint256) {
        return token.balanceOf(address(this));
    }

    function transfer(address to, uint256 value) external onlyOwner {
        token.safeTransfer(to, value);
    }
}

// File: contracts/MathUtils.sol

/*
Math utilities

This library implements various logarithmic math utilies which support
other contracts and specifically the GYSR multiplier calculation

https://github.com/gysr-io/core

h/t https://github.com/abdk-consulting/abdk-libraries-solidity


*/

pragma solidity ^0.6.12;

library MathUtils {
    /**
     * Calculate binary logarithm of x.  Revert if x <= 0.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function logbase2(int128 x) internal pure returns (int128) {
        require(x > 0);

        int256 msb = 0;
        int256 xc = x;
        if (xc >= 0x10000000000000000) {
            xc >>= 64;
            msb += 64;
        }
        if (xc >= 0x100000000) {
            xc >>= 32;
            msb += 32;
        }
        if (xc >= 0x10000) {
            xc >>= 16;
            msb += 16;
        }
        if (xc >= 0x100) {
            xc >>= 8;
            msb += 8;
        }
        if (xc >= 0x10) {
            xc >>= 4;
            msb += 4;
        }
        if (xc >= 0x4) {
            xc >>= 2;
            msb += 2;
        }
        if (xc >= 0x2) msb += 1; // No need to shift xc anymore

        int256 result = (msb - 64) << 64;
        uint256 ux = uint256(x) << (127 - msb);
        for (int256 bit = 0x8000000000000000; bit > 0; bit >>= 1) {
            ux *= ux;
            uint256 b = ux >> 255;
            ux >>= 127 + b;
            result += bit * int256(b);
        }

        return int128(result);
    }

    /**
     * @notice calculate natural logarithm of x
     * @dev magic constant comes from ln(2) * 2^128 -> hex
     * @param x signed 64.64-bit fixed point number, require x > 0
     * @return signed 64.64-bit fixed point number
     */
    function ln(int128 x) internal pure returns (int128) {
        require(x > 0);

        return
            int128(
                (uint256(logbase2(x)) * 0xB17217F7D1CF79ABC9E3B39803F2F6AF) >>
                    128
            );
    }

    /**
     * @notice calculate logarithm base 10 of x
     * @dev magic constant comes from log10(2) * 2^128 -> hex
     * @param x signed 64.64-bit fixed point number, require x > 0
     * @return signed 64.64-bit fixed point number
     */
    function logbase10(int128 x) internal pure returns (int128) {
        require(x > 0);

        return
            int128(
                (uint256(logbase2(x)) * 0x4d104d427de7fce20a6e420e02236748) >>
                    128
            );
    }

    // wrapper functions to allow testing
    function testlogbase2(int128 x) public pure returns (int128) {
        return logbase2(x);
    }

    function testlogbase10(int128 x) public pure returns (int128) {
        return logbase10(x);
    }
}

// File: contracts/Geyser.sol

/*
Geyser

This implements the core Geyser contract, which allows for generalized
staking, yield farming, and token distribution. This also implements
the GYSR spending mechanic for boosted reward distribution.

https://github.com/gysr-io/core

h/t https://github.com/ampleforth/token-geyser


*/

pragma solidity ^0.6.12;









/**
 * @title Geyser
 */
contract Geyser is IGeyser, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    using MathUtils for int128;

    // single stake by user
    struct Stake {
        uint256 shares;
        uint256 timestamp;
    }

    // summary of total user stake/shares
    struct User {
        uint256 shares;
        uint256 shareSeconds;
        uint256 lastUpdated;
    }

    // single funding/reward schedule
    struct Funding {
        uint256 amount;
        uint256 shares;
        uint256 unlocked;
        uint256 lastUpdated;
        uint256 start;
        uint256 end;
        uint256 duration;
    }

    // constants
    uint256 public constant BONUS_DECIMALS = 18;
    uint256 public constant INITIAL_SHARES_PER_TOKEN = 10**6;
    uint256 public constant MAX_ACTIVE_FUNDINGS = 16;

    // token pool fields
    GeyserPool private immutable _stakingPool;
    GeyserPool private immutable _unlockedPool;
    GeyserPool private immutable _lockedPool;
    Funding[] public fundings;

    // user staking fields
    mapping(address => User) public userTotals;
    mapping(address => Stake[]) public userStakes;

    // time bonus fields
    uint256 public immutable bonusMin;
    uint256 public immutable bonusMax;
    uint256 public immutable bonusPeriod;

    // global state fields
    uint256 public totalLockedShares;
    uint256 public totalStakingShares;
    uint256 public totalRewards;
    uint256 public totalGysrRewards;
    uint256 public totalStakingShareSeconds;
    uint256 public lastUpdated;

    // gysr fields
    IERC20 private immutable _gysr;

    /**
     * @param stakingToken_ the token that will be staked
     * @param rewardToken_ the token distributed to users as they unstake
     * @param bonusMin_ initial time bonus
     * @param bonusMax_ maximum time bonus
     * @param bonusPeriod_ period (in seconds) over which time bonus grows to max
     * @param gysr_ address for GYSR token
     */
    constructor(
        address stakingToken_,
        address rewardToken_,
        uint256 bonusMin_,
        uint256 bonusMax_,
        uint256 bonusPeriod_,
        address gysr_
    ) public {
        require(
            bonusMin_ <= bonusMax_,
            "Geyser: initial time bonus greater than max"
        );

        _stakingPool = new GeyserPool(stakingToken_);
        _unlockedPool = new GeyserPool(rewardToken_);
        _lockedPool = new GeyserPool(rewardToken_);

        bonusMin = bonusMin_;
        bonusMax = bonusMax_;
        bonusPeriod = bonusPeriod_;

        _gysr = IERC20(gysr_);

        lastUpdated = block.timestamp;
    }

    // IStaking

    /**
     * @inheritdoc IStaking
     */
    function stake(uint256 amount, bytes calldata) external override {
        _stake(msg.sender, msg.sender, amount);
    }

    /**
     * @inheritdoc IStaking
     */
    function stakeFor(
        address user,
        uint256 amount,
        bytes calldata
    ) external override {
        _stake(msg.sender, user, amount);
    }

    /**
     * @inheritdoc IStaking
     */
    function unstake(uint256 amount, bytes calldata) external override {
        _unstake(amount, 0);
    }

    /**
     * @inheritdoc IStaking
     */
    function totalStakedFor(address addr)
        public
        override
        view
        returns (uint256)
    {
        if (totalStakingShares == 0) {
            return 0;
        }
        return
            totalStaked().mul(userTotals[addr].shares).div(totalStakingShares);
    }

    /**
     * @inheritdoc IStaking
     */
    function totalStaked() public override view returns (uint256) {
        return _stakingPool.balance();
    }

    /**
     * @inheritdoc IStaking
     * @dev redundant with stakingToken() in order to implement IStaking (EIP-900)
     */
    function token() external override view returns (address) {
        return address(_stakingPool.token());
    }

    // IGeyser

    /**
     * @inheritdoc IGeyser
     */
    function stakingToken() public override view returns (address) {
        return address(_stakingPool.token());
    }

    /**
     * @inheritdoc IGeyser
     */
    function rewardToken() public override view returns (address) {
        return address(_unlockedPool.token());
    }

    /**
     * @inheritdoc IGeyser
     */
    function fund(uint256 amount, uint256 duration) public override {
        fund(amount, duration, block.timestamp);
    }

    /**
     * @inheritdoc IGeyser
     */
    function fund(
        uint256 amount,
        uint256 duration,
        uint256 start
    ) public override onlyOwner {
        // validate
        require(amount > 0, "Geyser: funding amount is zero");
        require(start >= block.timestamp, "Geyser: funding start is past");
        require(
            fundings.length < MAX_ACTIVE_FUNDINGS,
            "Geyser: exceeds max active funding schedules"
        );

        // update bookkeeping
        _update(msg.sender);

        // mint shares at current rate
        uint256 lockedTokens = totalLocked();
        uint256 mintedLockedShares = (lockedTokens > 0)
            ? totalLockedShares.mul(amount).div(lockedTokens)
            : amount.mul(INITIAL_SHARES_PER_TOKEN);

        totalLockedShares = totalLockedShares.add(mintedLockedShares);

        // create new funding
        fundings.push(
            Funding({
                amount: amount,
                shares: mintedLockedShares,
                unlocked: 0,
                lastUpdated: start,
                start: start,
                end: start.add(duration),
                duration: duration
            })
        );

        // do transfer of funding
        _lockedPool.token().safeTransferFrom(
            msg.sender,
            address(_lockedPool),
            amount
        );
        emit RewardsFunded(amount, duration, start, totalLocked());
    }

    /**
     * @inheritdoc IGeyser
     */
    function withdraw(uint256 amount) external override onlyOwner {
        require(amount > 0, "Geyser: withdraw amount is zero");
        require(
            amount <= _gysr.balanceOf(address(this)),
            "Geyser: withdraw amount exceeds balance"
        );
        // do transfer
        _gysr.safeTransfer(msg.sender, amount);

        emit GysrWithdrawn(amount);
    }

    /**
     * @inheritdoc IGeyser
     */
    function unstake(
        uint256 amount,
        uint256 gysr,
        bytes calldata
    ) external override {
        _unstake(amount, gysr);
    }

    /**
     * @inheritdoc IGeyser
     */
    function update() external override nonReentrant {
        _update(msg.sender);
    }

    /**
     * @inheritdoc IGeyser
     */
    function clean() external override onlyOwner {
        // update bookkeeping
        _update(msg.sender);

        // check for stale funding schedules to expire
        uint256 removed = 0;
        uint256 originalSize = fundings.length;
        for (uint256 i = 0; i < originalSize; i++) {
            Funding storage funding = fundings[i.sub(removed)];
            uint256 idx = i.sub(removed);

            if (_unlockable(idx) == 0 && block.timestamp >= funding.end) {
                emit RewardsExpired(
                    funding.amount,
                    funding.duration,
                    funding.start
                );

                // remove at idx by copying last element here, then popping off last
                // (we don't care about order)
                fundings[idx] = fundings[fundings.length.sub(1)];
                fundings.pop();
                removed = removed.add(1);
            }
        }
    }

    // Geyser

    /**
     * @dev internal implementation of staking methods
     * @param staker address to do deposit of staking tokens
     * @param beneficiary address to gain credit for this stake operation
     * @param amount number of staking tokens to deposit
     */
    function _stake(
        address staker,
        address beneficiary,
        uint256 amount
    ) private nonReentrant {
        // validate
        require(amount > 0, "Geyser: stake amount is zero");
        require(
            beneficiary != address(0),
            "Geyser: beneficiary is zero address"
        );

        // mint staking shares at current rate
        uint256 mintedStakingShares = (totalStakingShares > 0)
            ? totalStakingShares.mul(amount).div(totalStaked())
            : amount.mul(INITIAL_SHARES_PER_TOKEN);
        require(mintedStakingShares > 0, "Geyser: stake amount too small");

        // update bookkeeping
        _update(beneficiary);

        // update user staking info
        User storage user = userTotals[beneficiary];
        user.shares = user.shares.add(mintedStakingShares);
        user.lastUpdated = block.timestamp;

        userStakes[beneficiary].push(
            Stake(mintedStakingShares, block.timestamp)
        );

        // add newly minted shares to global total
        totalStakingShares = totalStakingShares.add(mintedStakingShares);

        // transactions
        _stakingPool.token().safeTransferFrom(
            staker,
            address(_stakingPool),
            amount
        );

        emit Staked(beneficiary, amount, totalStakedFor(beneficiary), "");
    }

    /**
     * @dev internal implementation of unstaking methods
     * @param amount number of tokens to unstake
     * @param gysr number of GYSR tokens applied to unstaking operation
     * @return number of reward tokens distributed
     */
    function _unstake(uint256 amount, uint256 gysr)
        private
        nonReentrant
        returns (uint256)
    {
        // validate
        require(amount > 0, "Geyser: unstake amount is zero");
        require(
            totalStakedFor(msg.sender) >= amount,
            "Geyser: unstake amount exceeds balance"
        );

        // update bookkeeping
        _update(msg.sender);

        // do unstaking, first-in last-out, respecting time bonus
        uint256 timeWeightedShareSeconds = _unstakeFirstInLastOut(amount);

        // compute and apply GYSR token bonus
        uint256 gysrWeightedShareSeconds = gysrBonus(gysr)
            .mul(timeWeightedShareSeconds)
            .div(10**BONUS_DECIMALS);

        uint256 rewardAmount = totalUnlocked()
            .mul(gysrWeightedShareSeconds)
            .div(totalStakingShareSeconds.add(gysrWeightedShareSeconds));

        // update global stats for distributions
        if (gysr > 0) {
            totalGysrRewards = totalGysrRewards.add(rewardAmount);
        }
        totalRewards = totalRewards.add(rewardAmount);

        // transactions
        _stakingPool.transfer(msg.sender, amount);
        emit Unstaked(msg.sender, amount, totalStakedFor(msg.sender), "");
        if (rewardAmount > 0) {
            _unlockedPool.transfer(msg.sender, rewardAmount);
            emit RewardsDistributed(msg.sender, rewardAmount);
        }
        if (gysr > 0) {
            _gysr.safeTransferFrom(msg.sender, address(this), gysr);
            emit GysrSpent(msg.sender, gysr);
        }
        return rewardAmount;
    }

    /**
     * @dev helper function to actually execute unstaking, first-in last-out, 
     while computing and applying time bonus. This function also updates
     user and global totals for shares and share-seconds.
     * @param amount number of staking tokens to withdraw
     * @return time bonus weighted staking share seconds
     */
    function _unstakeFirstInLastOut(uint256 amount) private returns (uint256) {
        uint256 stakingSharesToBurn = totalStakingShares.mul(amount).div(
            totalStaked()
        );
        require(stakingSharesToBurn > 0, "Geyser: unstake amount too small");

        // redeem from most recent stake and go backwards in time.
        uint256 shareSecondsToBurn = 0;
        uint256 sharesLeftToBurn = stakingSharesToBurn;
        uint256 bonusWeightedShareSeconds = 0;
        Stake[] storage stakes = userStakes[msg.sender];
        while (sharesLeftToBurn > 0) {
            Stake storage lastStake = stakes[stakes.length - 1];
            uint256 stakeTime = block.timestamp.sub(lastStake.timestamp);

            uint256 bonus = timeBonus(stakeTime);

            if (lastStake.shares <= sharesLeftToBurn) {
                // fully redeem a past stake
                bonusWeightedShareSeconds = bonusWeightedShareSeconds.add(
                    lastStake.shares.mul(stakeTime).mul(bonus).div(
                        10**BONUS_DECIMALS
                    )
                );
                shareSecondsToBurn = shareSecondsToBurn.add(
                    lastStake.shares.mul(stakeTime)
                );
                sharesLeftToBurn = sharesLeftToBurn.sub(lastStake.shares);
                stakes.pop();
            } else {
                // partially redeem a past stake
                bonusWeightedShareSeconds = bonusWeightedShareSeconds.add(
                    sharesLeftToBurn.mul(stakeTime).mul(bonus).div(
                        10**BONUS_DECIMALS
                    )
                );
                shareSecondsToBurn = shareSecondsToBurn.add(
                    sharesLeftToBurn.mul(stakeTime)
                );
                lastStake.shares = lastStake.shares.sub(sharesLeftToBurn);
                sharesLeftToBurn = 0;
            }
        }
        // update user totals
        User storage user = userTotals[msg.sender];
        user.shareSeconds = user.shareSeconds.sub(shareSecondsToBurn);
        user.shares = user.shares.sub(stakingSharesToBurn);
        user.lastUpdated = block.timestamp;

        // update global totals
        totalStakingShareSeconds = totalStakingShareSeconds.sub(
            shareSecondsToBurn
        );
        totalStakingShares = totalStakingShares.sub(stakingSharesToBurn);

        return bonusWeightedShareSeconds;
    }

    /**
     * @dev internal implementation of update method
     * @param addr address for user accounting update
     */
    function _update(address addr) private {
        _unlockTokens();

        // global accounting
        uint256 deltaTotalShareSeconds = (block.timestamp.sub(lastUpdated)).mul(
            totalStakingShares
        );
        totalStakingShareSeconds = totalStakingShareSeconds.add(
            deltaTotalShareSeconds
        );
        lastUpdated = block.timestamp;

        // user accounting
        User storage user = userTotals[addr];
        uint256 deltaUserShareSeconds = (block.timestamp.sub(user.lastUpdated))
            .mul(user.shares);
        user.shareSeconds = user.shareSeconds.add(deltaUserShareSeconds);
        user.lastUpdated = block.timestamp;
    }

    /**
     * @dev unlocks reward tokens based on funding schedules
     */
    function _unlockTokens() private {
        uint256 tokensToUnlock = 0;
        uint256 lockedTokens = totalLocked();

        if (totalLockedShares == 0) {
            // handle any leftover
            tokensToUnlock = lockedTokens;
        } else {
            // normal case: unlock some shares from each funding schedule
            uint256 sharesToUnlock = 0;
            for (uint256 i = 0; i < fundings.length; i++) {
                uint256 shares = _unlockable(i);
                Funding storage funding = fundings[i];
                if (shares > 0) {
                    funding.unlocked = funding.unlocked.add(shares);
                    funding.lastUpdated = block.timestamp;
                    sharesToUnlock = sharesToUnlock.add(shares);
                }
            }
            tokensToUnlock = sharesToUnlock.mul(lockedTokens).div(
                totalLockedShares
            );
            totalLockedShares = totalLockedShares.sub(sharesToUnlock);
        }

        if (tokensToUnlock > 0) {
            _lockedPool.transfer(address(_unlockedPool), tokensToUnlock);
            emit RewardsUnlocked(tokensToUnlock, totalUnlocked());
        }
    }

    /**
     * @dev helper function to compute updates to funding schedules
     * @param idx index of the funding
     * @return the number of unlockable shares
     */
    function _unlockable(uint256 idx) private view returns (uint256) {
        Funding storage funding = fundings[idx];

        // funding schedule is in future
        if (block.timestamp < funding.start) {
            return 0;
        }
        // empty
        if (funding.unlocked >= funding.shares) {
            return 0;
        }
        // handle zero-duration period or leftover dust from integer division
        if (block.timestamp >= funding.end) {
            return funding.shares.sub(funding.unlocked);
        }

        return
            (block.timestamp.sub(funding.lastUpdated)).mul(funding.shares).div(
                funding.duration
            );
    }

    /**
     * @notice compute time bonus earned as a function of staking time
     * @param time length of time for which the tokens have been staked
     * @return bonus multiplier for time
     */
    function timeBonus(uint256 time) public view returns (uint256) {
        if (time >= bonusPeriod) {
            return uint256(10**BONUS_DECIMALS).add(bonusMax);
        }

        // linearly interpolate between bonus min and bonus max
        uint256 bonus = bonusMin.add(
            (bonusMax.sub(bonusMin)).mul(time).div(bonusPeriod)
        );
        return uint256(10**BONUS_DECIMALS).add(bonus);
    }

    /**
     * @notice compute GYSR bonus as a function of usage ratio and GYSR spent
     * @param gysr number of GYSR token applied to bonus
     * @return multiplier value
     */
    function gysrBonus(uint256 gysr) public view returns (uint256) {
        if (gysr == 0) {
            return 10**BONUS_DECIMALS;
        }
        require(
            gysr >= 10**BONUS_DECIMALS,
            "Geyser: GYSR amount is between 0 and 1"
        );

        uint256 buffer = uint256(10**(BONUS_DECIMALS - 2)); // 0.01
        uint256 r = ratio().add(buffer);
        uint256 x = gysr.add(buffer);

        return
            uint256(10**BONUS_DECIMALS).add(
                uint256(int128(x.mul(2**64).div(r)).logbase10())
                    .mul(10**BONUS_DECIMALS)
                    .div(2**64)
            );
    }

    /**
     * @return portion of rewards which have been boosted by GYSR token
     */
    function ratio() public view returns (uint256) {
        if (totalRewards == 0) {
            return 0;
        }
        return totalGysrRewards.mul(10**BONUS_DECIMALS).div(totalRewards);
    }

    // Geyser -- informational functions

    /**
     * @return total number of locked reward tokens
     */
    function totalLocked() public view returns (uint256) {
        return _lockedPool.balance();
    }

    /**
     * @return total number of unlocked reward tokens
     */
    function totalUnlocked() public view returns (uint256) {
        return _unlockedPool.balance();
    }

    /**
     * @return number of active funding schedules
     */
    function fundingCount() public view returns (uint256) {
        return fundings.length;
    }

    /**
     * @param addr address of interest
     * @return number of active stakes for user
     */
    function stakeCount(address addr) public view returns (uint256) {
        return userStakes[addr].length;
    }

    /**
     * @notice preview estimated reward distribution for full unstake with no GYSR applied
     * @return estimated reward
     * @return estimated overall multiplier
     * @return estimated raw user share seconds that would be burned
     * @return estimated total unlocked rewards
     */
    function preview()
        public
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        return preview(msg.sender, totalStakedFor(msg.sender), 0);
    }

    /**
     * @notice preview estimated reward distribution for unstaking
     * @param addr address of interest for preview
     * @param amount number of tokens that would be unstaked
     * @param gysr number of GYSR tokens that would be applied
     * @return estimated reward
     * @return estimated overall multiplier
     * @return estimated raw user share seconds that would be burned
     * @return estimated total unlocked rewards
     */
    function preview(
        address addr,
        uint256 amount,
        uint256 gysr
    )
        public
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        // compute expected updates to global totals
        uint256 deltaUnlocked = 0;
        if (totalLockedShares != 0) {
            uint256 sharesToUnlock = 0;
            for (uint256 i = 0; i < fundings.length; i++) {
                sharesToUnlock = sharesToUnlock.add(_unlockable(i));
            }
            deltaUnlocked = sharesToUnlock.mul(totalLocked()).div(
                totalLockedShares
            );
        }

        // no need for unstaking/rewards computation
        if (amount == 0) {
            return (0, 0, 0, totalUnlocked().add(deltaUnlocked));
        }

        // check unstake amount
        require(
            amount <= totalStakedFor(addr),
            "Geyser: preview amount exceeds balance"
        );

        // compute unstake amount in shares
        uint256 shares = totalStakingShares.mul(amount).div(totalStaked());
        require(shares > 0, "Geyser: preview amount too small");

        uint256 rawShareSeconds = 0;
        uint256 timeBonusShareSeconds = 0;

        // compute first-in-last-out, time bonus weighted, share seconds
        uint256 i = userStakes[addr].length.sub(1);
        while (shares > 0) {
            Stake storage s = userStakes[addr][i];
            uint256 time = block.timestamp.sub(s.timestamp);

            if (s.shares < shares) {
                rawShareSeconds = rawShareSeconds.add(s.shares.mul(time));
                timeBonusShareSeconds = timeBonusShareSeconds.add(
                    s.shares.mul(time).mul(timeBonus(time)).div(
                        10**BONUS_DECIMALS
                    )
                );
                shares = shares.sub(s.shares);
            } else {
                rawShareSeconds = rawShareSeconds.add(shares.mul(time));
                timeBonusShareSeconds = timeBonusShareSeconds.add(
                    shares.mul(time).mul(timeBonus(time)).div(
                        10**BONUS_DECIMALS
                    )
                );
                break;
            }
            // this will throw on underflow
            i = i.sub(1);
        }

        // apply gysr bonus
        uint256 gysrBonusShareSeconds = gysrBonus(gysr)
            .mul(timeBonusShareSeconds)
            .div(10**BONUS_DECIMALS);

        // compute rewards based on expected updates
        uint256 expectedTotalShareSeconds = totalStakingShareSeconds
            .add((block.timestamp.sub(lastUpdated)).mul(totalStakingShares))
            .add(gysrBonusShareSeconds)
            .sub(rawShareSeconds);

        uint256 reward = (totalUnlocked().add(deltaUnlocked))
            .mul(gysrBonusShareSeconds)
            .div(expectedTotalShareSeconds);

        // compute effective bonus
        uint256 bonus = uint256(10**BONUS_DECIMALS)
            .mul(gysrBonusShareSeconds)
            .div(rawShareSeconds);

        return (
            reward,
            bonus,
            rawShareSeconds,
            totalUnlocked().add(deltaUnlocked)
        );
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"stakingToken_","type":"address"},{"internalType":"address","name":"rewardToken_","type":"address"},{"internalType":"uint256","name":"bonusMin_","type":"uint256"},{"internalType":"uint256","name":"bonusMax_","type":"uint256"},{"internalType":"uint256","name":"bonusPeriod_","type":"uint256"},{"internalType":"address","name":"gysr_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"GysrSpent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"GysrWithdrawn","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"}],"name":"RewardsExpired","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"RewardsFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"RewardsUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"BONUS_DECIMALS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_SHARES_PER_TOKEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ACTIVE_FUNDINGS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clean","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"}],"name":"fund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"fund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fundingCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"fundings","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"unlocked","type":"uint256"},{"internalType":"uint256","name":"lastUpdated","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gysr","type":"uint256"}],"name":"gysrBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"gysr","type":"uint256"}],"name":"preview","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preview","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ratio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"stakeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supportsHistory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"timeBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalGysrRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLockedShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"totalStakedFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakingShareSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakingShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnlocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"gysr","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userStakes","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userTotals","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"shareSeconds","type":"uint256"},{"internalType":"uint256","name":"lastUpdated","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101606040523480156200001257600080fd5b5060405162003df038038062003df0833981810160405260c08110156200003857600080fd5b508051602082015160408301516060840151608085015160a09095015193949293919290916000620000696200020e565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001805582841115620000f85760405162461bcd60e51b815260040180806020018281038252602b81526020018062003dc5602b913960400191505060405180910390fd5b85604051620001079062000212565b6001600160a01b03909116815260405190819003602001906000f08015801562000135573d6000803e3d6000fd5b5060601b6001600160601b0319166080526040518590620001569062000212565b6001600160a01b03909116815260405190819003602001906000f08015801562000184573d6000803e3d6000fd5b5060601b6001600160601b03191660a0526040518590620001a59062000212565b6001600160a01b03909116815260405190819003602001906000f080158015620001d3573d6000803e3d6000fd5b506001600160601b0319606091821b811660c05260e0959095526101009390935261012091909152901b1661014052505042600a5562000220565b3390565b610a6c806200335983390190565b60805160601c60a05160601c60c05160601c60e05161010051610120516101405160601c61307f620002da60003980610cf85280610db552806125eb525080610e54528061123a52806112a25250806110c7528061126d52806112ca525080610bd952806112eb5280611311525080610ac95280610aeb5280610ed4528061271a5250806113d652806119555280612542528061274952508061106e52806110ed5280611dfe5280611e205280612441525061307f6000f3fe608060405234801561001057600080fd5b50600436106102de5760003560e01c806381c39bec11610186578063c8131c15116100e3578063dc16ceb911610097578063f7c618c111610071578063f7c618c114610819578063fc0c546a14610535578063fc4333cd14610821576102de565b8063dc16ceb9146107e3578063efae2305146107eb578063f2fde38b146107f3576102de565b8063cd6ef9b1116100c8578063cd6ef9b11461070a578063d0b06f5d14610786578063d13cb1fb1461078e576102de565b8063c8131c151461068b578063c8fd6ed014610693576102de565b8063a5be655c1161013a578063a779d0801161011f578063a779d080146105e6578063b5d5b5fa146105ee578063c20e813714610633576102de565b8063a5be655c146105bb578063a65e2cfd146105c3576102de565b80638da5cb5b1161016b5780638da5cb5b1461058e5780639e57e49114610596578063a2e62045146105b3576102de565b806381c39bec14610569578063862e4c5f14610571576102de565b80634b341aed1161023f57806370c6a17e116101f357806372f702f3116101cd57806372f702f3146105355780637aba86d214610559578063817b1cd214610561576102de565b806370c6a17e1461051d578063715018a61461052557806371ca337d1461052d576102de565b80634fb2f554116102245780634fb2f554146104f157806356891412146104f95780637033e4a614610501576102de565b80634b341aed146104c35780634b8456b8146104e9576102de565b80631dc27fde1161029657806333060d901161027b57806333060d9014610451578063385c9e7d146104775780634af4a127146104bb576102de565b80631dc27fde1461042c5780632e1a7d4d14610434576102de565b80630ef96356116102c75780630ef9635614610376578063111d7d50146103fb5780631b87d58a14610424576102de565b80630e15561a146102e35780630e89439b146102fd575b600080fd5b6102eb610829565b60408051918252519081900360200190f35b6103746004803603604081101561031357600080fd5b8135919081019060408101602082013564010000000081111561033557600080fd5b82018360208201111561034757600080fd5b8035906020019184600183028401116401000000008311171561036957600080fd5b50909250905061082f565b005b6103746004803603606081101561038c57600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156103bc57600080fd5b8201836020820111156103ce57600080fd5b803590602001918460018302840111640100000000831117156103f057600080fd5b50909250905061083f565b6103746004803603606081101561041157600080fd5b5080359060208101359060400135610850565b6102eb610bd7565b6102eb610bfb565b6103746004803603602081101561044a57600080fd5b5035610c00565b6102eb6004803603602081101561046757600080fd5b50356001600160a01b0316610e12565b61049d6004803603602081101561048d57600080fd5b50356001600160a01b0316610e31565b60408051938452602084019290925282820152519081900360600190f35b6102eb610e52565b6102eb600480360360208110156104d957600080fd5b50356001600160a01b0316610e76565b6102eb610ec4565b6102eb610ec9565b6102eb610ed0565b610509610f5c565b604080519115158252519081900360200190f35b6102eb610f61565b610374610f67565b6102eb611033565b61053d61106a565b604080516001600160a01b039092168252519081900360200190f35b6102eb6110c5565b6102eb6110e9565b6102eb611144565b6102eb6004803603602081101561058757600080fd5b503561114a565b61053d611227565b6102eb600480360360208110156105ac57600080fd5b5035611236565b610374611351565b6102eb6113bd565b610374600480360360408110156105d957600080fd5b50803590602001356113c3565b6102eb6113d2565b61061a6004803603604081101561060457600080fd5b506001600160a01b03813516906020013561142d565b6040805192835260208301919091528051918290030190f35b6106656004803603606081101561064957600080fd5b506001600160a01b038135169060208101359060400135611466565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6102eb611789565b610374600480360360408110156106a957600080fd5b813591908101906040810160208201356401000000008111156106cb57600080fd5b8201836020820111156106dd57600080fd5b803590602001918460018302840111640100000000831117156106ff57600080fd5b50909250905061178f565b6103746004803603606081101561072057600080fd5b81359160208101359181019060608101604082013564010000000081111561074757600080fd5b82018360208201111561075957600080fd5b8035906020019184600183028401116401000000008311171561077b57600080fd5b50909250905061179a565b6102eb6117ab565b6107ab600480360360208110156107a457600080fd5b50356117b1565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b6102eb611800565b610665611807565b6103746004803603602081101561080957600080fd5b50356001600160a01b031661182f565b61053d611951565b6103746119ac565b60075481565b61083a333385611be0565b505050565b61084a338585611be0565b50505050565b610858611ede565b6000546001600160a01b039081169116146108ba576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000831161090f576040805162461bcd60e51b815260206004820152601e60248201527f4765797365723a2066756e64696e6720616d6f756e74206973207a65726f0000604482015290519081900360640190fd5b42811015610964576040805162461bcd60e51b815260206004820152601d60248201527f4765797365723a2066756e64696e672073746172742069732070617374000000604482015290519081900360640190fd5b6002546010116109a55760405162461bcd60e51b815260040180806020018281038252602c815260200180612fa8602c913960400191505060405180910390fd5b6109ae33611ee2565b60006109b8610ed0565b905060008082116109d5576109d085620f4240611f72565b6109f4565b6109f4826109ee87600554611f7290919063ffffffff16565b90611fcb565b600554909150610a04908261200d565b60058190555060026040518060e0016040528087815260200183815260200160008152602001858152602001858152602001610a49878761200d90919063ffffffff16565b8152602001868152509080600181540180825580915050600190039060005260206000209060070201600090919091909150600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c082015181600601555050610b7f337f0000000000000000000000000000000000000000000000000000000000000000877f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4257600080fd5b505afa158015610b56573d6000803e3d6000fd5b505050506040513d6020811015610b6c57600080fd5b50516001600160a01b0316929190612067565b7fd3599d59babb3b3382347fcd4e88030d12d499404076688f2fc4efab2d3c4a57858585610bab610ed0565b604080519485526020850193909352838301919091526060830152519081900360800190a15050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b601281565b610c08611ede565b6000546001600160a01b03908116911614610c6a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008111610cbf576040805162461bcd60e51b815260206004820152601f60248201527f4765797365723a20776974686472617720616d6f756e74206973207a65726f00604482015290519081900360640190fd5b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015610d3e57600080fd5b505afa158015610d52573d6000803e3d6000fd5b505050506040513d6020811015610d6857600080fd5b5051811115610da85760405162461bcd60e51b8152600401808060200182810382526027815260200180612ef16027913960400191505060405180910390fd5b610ddc6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633836120ef565b6040805182815290517f9893b6ecc024ca2ea684c8b98d392ba3e47fd995e6f6ddddc1b0c7acf5b9dd2b9181900360200190a150565b6001600160a01b0381166000908152600460205260409020545b919050565b60036020526000908152604090208054600182015460029092015490919083565b7f000000000000000000000000000000000000000000000000000000000000000081565b600060065460001415610e8b57506000610e2c565b6006546001600160a01b038316600090815260036020526040902054610ebe91906109ee90610eb86110e9565b90611f72565b92915050565b601081565b6002545b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b69ef8a86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b505afa158015610f3f573d6000803e3d6000fd5b505050506040513d6020811015610f5557600080fd5b5051905090565b600090565b60065481565b610f6f611ede565b6000546001600160a01b03908116911614610fd1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60006007546000141561104857506000610ecd565b60075460085461106591906109ee90670de0b6b3a7640000611f72565b905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b69ef8a86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b60055481565b6000816111605750670de0b6b3a7640000610e2c565b670de0b6b3a76400008210156111a75760405162461bcd60e51b8152600401808060200182810382526026815260200180612fd46026913960400191505060405180910390fd5b662386f26fc1000060006111c3826111bd611033565b9061200d565b905060006111d1858461200d565b905061121e61120f680100000000000000006109ee670de0b6b3a76400006112066111fe88848987611f72565b600f0b61216f565b600f0b90611f72565b670de0b6b3a76400009061200d565b95945050505050565b6000546001600160a01b031690565b60007f0000000000000000000000000000000000000000000000000000000000000000821061129857611291670de0b6b3a76400007f000000000000000000000000000000000000000000000000000000000000000061200d565b9050610e2c565b600061133661130f7f00000000000000000000000000000000000000000000000000000000000000006109ee86610eb87f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006121a9565b7f00000000000000000000000000000000000000000000000000000000000000009061200d565b905061134a670de0b6b3a76400008261200d565b9392505050565b600260015414156113a9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556113b733611ee2565b60018055565b60095481565b6113ce828242610850565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b69ef8a86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b6004602052816000526040600020818154811061144657fe5b600091825260209091206002909102018054600190910154909250905082565b60008060008060006005546000146114c0576000805b6002548110156114a357611499611492826121eb565b839061200d565b915060010161147c565b506114bc6005546109ee6114b5610ed0565b8490611f72565b9150505b866114e45760008060006114d6846111bd6113d2565b945094509450945050611780565b6114ed88610e76565b87111561152b5760405162461bcd60e51b8152600401808060200182810382526026815260200180612f616026913960400191505060405180910390fd5b60006115456115386110e9565b6006546109ee908b611f72565b90506000811161159c576040805162461bcd60e51b815260206004820181905260248201527f4765797365723a207072657669657720616d6f756e7420746f6f20736d616c6c604482015290519081900360640190fd5b6001600160a01b038916600090815260046020526040812054819081906115c49060016121a9565b90505b83156116d7576001600160a01b038c1660009081526004602052604081208054839081106115f157fe5b90600052602060002090600202019050600061161a8260010154426121a990919063ffffffff16565b9050858260000154101561168657815461163f906116389083611f72565b869061200d565b945061166f611668670de0b6b3a76400006109ee61165c85611236565b8654610eb89087611f72565b859061200d565b825490945061167f9087906121a9565b95506116c3565b6116936116388783611f72565b94506116ba611668670de0b6b3a76400006109ee6116b085611236565b610eb88b87611f72565b935050506116d7565b6116ce8360016121a9565b925050506115c7565b60006116f2670de0b6b3a76400006109ee85610eb88f61114a565b9050600061172b85611725846111bd61171c600654610eb8600a54426121a990919063ffffffff16565b6009549061200d565b906121a9565b90506000611743826109ee85610eb88c6111bd6113d2565b9050600061175d876109ee670de0b6b3a764000087611f72565b905081818861176e8c6111bd6113d2565b9c509c509c509c505050505050505050505b93509350935093565b60085481565b61084a836000612287565b6117a48484612287565b5050505050565b600a5481565b600281815481106117be57fe5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b620f424081565b6000806000806118213361181a33610e76565b6000611466565b935093509350935090919293565b611837611ede565b6000546001600160a01b03908116911614611899576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166118de5760405162461bcd60e51b8152600401808060200182810382526026815260200180612f186026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b6119b4611ede565b6000546001600160a01b03908116911614611a16576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611a1f33611ee2565b600254600090815b8181101561083a5760006002611a3d83866121a9565b81548110611a4757fe5b6000918252602082206007909102019150611a6283866121a9565b9050611a6d816121eb565b158015611a7e575081600501544210155b15611bd65781546006830154600484015460408051938452602084019290925282820152517f3bdea4ef9f7e20da64d7c2f1e5fca1178145d56d25bad0e0a23d7a209261fe7b9181900360600190a160028054611adc9060016121a9565b81548110611ae657fe5b906000526020600020906007020160028281548110611b0157fe5b9060005260206000209060070201600082015481600001556001820154816001015560028201548160020155600382015481600301556004820154816004015560058201548160050155600682015481600601559050506002805480611b6357fe5b60008281526020812060077fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909301928302018181556001818101839055600282018390556003820183905560048201839055600582018390556006909101919091559155611bd390869061200d565b94505b5050600101611a27565b60026001541415611c38576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015580611c8f576040805162461bcd60e51b815260206004820152601c60248201527f4765797365723a207374616b6520616d6f756e74206973207a65726f00000000604482015290519081900360640190fd5b6001600160a01b038216611cd45760405162461bcd60e51b8152600401808060200182810382526023815260200180612f3e6023913960400191505060405180910390fd5b60008060065411611cf157611cec82620f4240611f72565b611d09565b611d09611cfc6110e9565b6006546109ee9085611f72565b905060008111611d60576040805162461bcd60e51b815260206004820152601e60248201527f4765797365723a207374616b6520616d6f756e7420746f6f20736d616c6c0000604482015290519081900360640190fd5b611d6983611ee2565b6001600160a01b03831660009081526003602052604090208054611d8d908361200d565b81554260028083018290556001600160a01b03861660009081526004602090815260408083208151808301909252878252818301958652805460018181018355918552929093209051919093029092019182559151910155600654611df2908361200d565b600681905550611e77857f0000000000000000000000000000000000000000000000000000000000000000857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4257600080fd5b836001600160a01b03167fc65e53b88159e7d2c0fc12a0600072e28ae53ff73b4c1715369c30f16093514284611eac87610e76565b6040805192835260208301919091526060828201819052600090830152519081900360a00190a2505060018055505050565b3390565b611eea612657565b6000611f07600654610eb8600a54426121a990919063ffffffff16565b600954909150611f17908261200d565b60095542600a8190556001600160a01b0383166000908152600360205260408120805460028201549193611f4f92610eb891906121a9565b6001830154909150611f61908261200d565b600183015550426002909101555050565b600082611f8157506000610ebe565b82820282848281611f8e57fe5b041461134a5760405162461bcd60e51b8152600401808060200182810382526021815260200180612f876021913960400191505060405180910390fd5b600061134a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061280d565b60008282018381101561134a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261084a9085906128af565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261083a9084906128af565b60008082600f0b1361218057600080fd5b608061218b83612960565b600f0b6f4d104d427de7fce20a6e420e0223674802901c9050919050565b600061134a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612a71565b600080600283815481106121fb57fe5b906000526020600020906007020190508060040154421015612221576000915050610e2c565b806001015481600201541061223a576000915050610e2c565b806005015442106122605760028101546001820154612258916121a9565b915050610e2c565b61134a81600601546109ee8360010154610eb88560030154426121a990919063ffffffff16565b6000600260015414156122e1576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015582612338576040805162461bcd60e51b815260206004820152601e60248201527f4765797365723a20756e7374616b6520616d6f756e74206973207a65726f0000604482015290519081900360640190fd5b8261234233610e76565b101561237f5760405162461bcd60e51b81526004018080602001828103825260268152602001806130246026913960400191505060405180910390fd5b61238833611ee2565b600061239384612acb565b905060006123b0670de0b6b3a76400006109ee84610eb88861114a565b905060006123d86123cc8360095461200d90919063ffffffff16565b6109ee84610eb86113d2565b905084156123f1576008546123ed908261200d565b6008555b6007546123fe908261200d565b600755604080517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810188905290516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb91604480830192600092919082900301818387803b15801561248857600080fd5b505af115801561249c573d6000803e3d6000fd5b50505050336001600160a01b03167faf01bfc8475df280aca00b578c4a948e6d95700f0db8c13365240f7f973c8754876124d533610e76565b6040805192835260208301919091526060828201819052600090830152519081900360a00190a280156125d857604080517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb91604480830192600092919082900301818387803b15801561258957600080fd5b505af115801561259d573d6000803e3d6000fd5b50506040805184815290513393507fdf29796aad820e4bb192f3a8d631b76519bcd2cbe77cc85af20e9df53cece08692509081900360200190a25b841561264a576126136001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333088612067565b60408051868152905133917fc16aaa1ae5a136c89a5275f4f29944ca4f17d3815f9122eae9455ae495b4c76f919081900360200190a25b6001805595945050505050565b600080612662610ed0565b90506005546000141561267757809150612712565b6000805b6002548110156126eb576000612690826121eb565b90506000600283815481106126a157fe5b9060005260206000209060070201905060008211156126e15760028101546126c9908361200d565b60028201554260038201556126de848361200d565b93505b505060010161267b565b506005546126fd906109ee8385611f72565b60055490935061270d90826121a9565b600555505b81156113ce577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb7f0000000000000000000000000000000000000000000000000000000000000000846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156127af57600080fd5b505af11580156127c3573d6000803e3d6000fd5b505050507f05b6b33aa8c89542004be445284c4d44c5f3654d65638da167510824426020dd826127f16113d2565b6040805192835260208301919091528051918290030190a15050565b600081836128995760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561285e578181015183820152602001612846565b50505050905090810190601f16801561288b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816128a557fe5b0495945050505050565b6060612904826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d159092919063ffffffff16565b80519091501561083a5780806020019051602081101561292357600080fd5b505161083a5760405162461bcd60e51b815260040180806020018281038252602a815260200180612ffa602a913960400191505060405180910390fd5b60008082600f0b1361297157600080fd5b6000600f83900b680100000000000000008112612990576040918201911d5b64010000000081126129a4576020918201911d5b6201000081126129b6576010918201911d5b61010081126129c7576008918201911d5b601081126129d7576004918201911d5b600481126129e7576002918201911d5b600281126129f6576001820191505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0820160401b6000607f849003600f87900b82821215612a3257fe5b901b90506780000000000000005b6000811315612a665790800260ff81901c8281029390930192607f011c9060011d612a40565b509095945050505050565b60008184841115612ac35760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561285e578181015183820152602001612846565b505050900390565b600080612ae6612ad96110e9565b6006546109ee9086611f72565b905060008111612b3d576040805162461bcd60e51b815260206004820181905260248201527f4765797365723a20756e7374616b6520616d6f756e7420746f6f20736d616c6c604482015290519081900360640190fd5b336000908152600460205260408120829082905b8215612cb257805460009082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110612b8a57fe5b906000526020600020906002020190506000612bb38260010154426121a990919063ffffffff16565b90506000612bc082611236565b905085836000015411612c68578254612bf19061163890670de0b6b3a7640000906109ee908590610eb89088611f72565b8354909550612c0b90612c049084611f72565b889061200d565b8354909750612c1b9087906121a9565b955083805480612c2757fe5b60008281526020812060027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90930192830201818155600101559055612caa565b612c85611638670de0b6b3a76400006109ee84610eb88b88611f72565b9450612c94612c048784611f72565b8354909750612ca390876121a9565b8355600095505b505050612b51565b3360009081526003602052604090206001810154612cd090866121a9565b60018201558054612ce190876121a9565b8155426002820155600954612cf690866121a9565b600955600654612d0690876121a9565b60065550909695505050505050565b6060612d248484600085612d2c565b949350505050565b6060612d3785612eb7565b612d88576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612de557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612da8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612e47576040519150601f19603f3d011682016040523d82523d6000602084013e612e4c565b606091505b50915091508115612e60579150612d249050565b805115612e705780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561285e578181015183820152602001612846565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612d2457505015159291505056fe4765797365723a20776974686472617720616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734765797365723a2062656e6566696369617279206973207a65726f20616464726573734765797365723a207072657669657720616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774765797365723a2065786365656473206d6178206163746976652066756e64696e67207363686564756c65734765797365723a204759535220616d6f756e74206973206265747765656e203020616e6420315361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644765797365723a20756e7374616b6520616d6f756e7420657863656564732062616c616e6365a264697066735822122040245f7f8574bc32c1d8a39e2a30f6b652090bce752afe38defb2fe08530ff5964736f6c634300060c0033608060405234801561001057600080fd5b50604051610a6c380380610a6c8339818101604052602081101561003357600080fd5b5051600061003f6100ae565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100b2565b3390565b6109ab806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063b69ef8a811610050578063b69ef8a8146100eb578063f2fde38b14610105578063fc0c546a1461013857610072565b8063715018a6146100775780638da5cb5b14610081578063a9059cbb146100b2575b600080fd5b61007f610140565b005b610089610240565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61007f600480360360408110156100c857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561025c565b6100f3610315565b60408051918252519081900360200190f35b61007f6004803603602081101561011b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166103b7565b610089610541565b61014861055d565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146101d157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b61026461055d565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146102ed57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001546103119073ffffffffffffffffffffffffffffffffffffffff168383610561565b5050565b600154604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561038657600080fd5b505afa15801561039a573d6000803e3d6000fd5b505050506040513d60208110156103b057600080fd5b5051905090565b6103bf61055d565b60005473ffffffffffffffffffffffffffffffffffffffff90811691161461044857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166104b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806109266026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526105ee9084906105f3565b505050565b6060610655826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166106cb9092919063ffffffff16565b8051909150156105ee5780806020019051602081101561067457600080fd5b50516105ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061094c602a913960400191505060405180910390fd5b60606106da84846000856106e2565b949350505050565b60606106ed856108ec565b61075857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106107c257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610785565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610824576040519150601f19603f3d011682016040523d82523d6000602084013e610829565b606091505b5091509150811561083d5791506106da9050565b80511561084d5780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108b1578181015183820152602001610899565b50505050905090810190601f1680156108de5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106da57505015159291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220508113572eba8bf03da07272670238671331c96291acad5f41311f06be8c926564736f6c634300060c00334765797365723a20696e697469616c2074696d6520626f6e75732067726561746572207468616e206d6178000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000d2f00000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102de5760003560e01c806381c39bec11610186578063c8131c15116100e3578063dc16ceb911610097578063f7c618c111610071578063f7c618c114610819578063fc0c546a14610535578063fc4333cd14610821576102de565b8063dc16ceb9146107e3578063efae2305146107eb578063f2fde38b146107f3576102de565b8063cd6ef9b1116100c8578063cd6ef9b11461070a578063d0b06f5d14610786578063d13cb1fb1461078e576102de565b8063c8131c151461068b578063c8fd6ed014610693576102de565b8063a5be655c1161013a578063a779d0801161011f578063a779d080146105e6578063b5d5b5fa146105ee578063c20e813714610633576102de565b8063a5be655c146105bb578063a65e2cfd146105c3576102de565b80638da5cb5b1161016b5780638da5cb5b1461058e5780639e57e49114610596578063a2e62045146105b3576102de565b806381c39bec14610569578063862e4c5f14610571576102de565b80634b341aed1161023f57806370c6a17e116101f357806372f702f3116101cd57806372f702f3146105355780637aba86d214610559578063817b1cd214610561576102de565b806370c6a17e1461051d578063715018a61461052557806371ca337d1461052d576102de565b80634fb2f554116102245780634fb2f554146104f157806356891412146104f95780637033e4a614610501576102de565b80634b341aed146104c35780634b8456b8146104e9576102de565b80631dc27fde1161029657806333060d901161027b57806333060d9014610451578063385c9e7d146104775780634af4a127146104bb576102de565b80631dc27fde1461042c5780632e1a7d4d14610434576102de565b80630ef96356116102c75780630ef9635614610376578063111d7d50146103fb5780631b87d58a14610424576102de565b80630e15561a146102e35780630e89439b146102fd575b600080fd5b6102eb610829565b60408051918252519081900360200190f35b6103746004803603604081101561031357600080fd5b8135919081019060408101602082013564010000000081111561033557600080fd5b82018360208201111561034757600080fd5b8035906020019184600183028401116401000000008311171561036957600080fd5b50909250905061082f565b005b6103746004803603606081101561038c57600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156103bc57600080fd5b8201836020820111156103ce57600080fd5b803590602001918460018302840111640100000000831117156103f057600080fd5b50909250905061083f565b6103746004803603606081101561041157600080fd5b5080359060208101359060400135610850565b6102eb610bd7565b6102eb610bfb565b6103746004803603602081101561044a57600080fd5b5035610c00565b6102eb6004803603602081101561046757600080fd5b50356001600160a01b0316610e12565b61049d6004803603602081101561048d57600080fd5b50356001600160a01b0316610e31565b60408051938452602084019290925282820152519081900360600190f35b6102eb610e52565b6102eb600480360360208110156104d957600080fd5b50356001600160a01b0316610e76565b6102eb610ec4565b6102eb610ec9565b6102eb610ed0565b610509610f5c565b604080519115158252519081900360200190f35b6102eb610f61565b610374610f67565b6102eb611033565b61053d61106a565b604080516001600160a01b039092168252519081900360200190f35b6102eb6110c5565b6102eb6110e9565b6102eb611144565b6102eb6004803603602081101561058757600080fd5b503561114a565b61053d611227565b6102eb600480360360208110156105ac57600080fd5b5035611236565b610374611351565b6102eb6113bd565b610374600480360360408110156105d957600080fd5b50803590602001356113c3565b6102eb6113d2565b61061a6004803603604081101561060457600080fd5b506001600160a01b03813516906020013561142d565b6040805192835260208301919091528051918290030190f35b6106656004803603606081101561064957600080fd5b506001600160a01b038135169060208101359060400135611466565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6102eb611789565b610374600480360360408110156106a957600080fd5b813591908101906040810160208201356401000000008111156106cb57600080fd5b8201836020820111156106dd57600080fd5b803590602001918460018302840111640100000000831117156106ff57600080fd5b50909250905061178f565b6103746004803603606081101561072057600080fd5b81359160208101359181019060608101604082013564010000000081111561074757600080fd5b82018360208201111561075957600080fd5b8035906020019184600183028401116401000000008311171561077b57600080fd5b50909250905061179a565b6102eb6117ab565b6107ab600480360360208110156107a457600080fd5b50356117b1565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b6102eb611800565b610665611807565b6103746004803603602081101561080957600080fd5b50356001600160a01b031661182f565b61053d611951565b6103746119ac565b60075481565b61083a333385611be0565b505050565b61084a338585611be0565b50505050565b610858611ede565b6000546001600160a01b039081169116146108ba576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000831161090f576040805162461bcd60e51b815260206004820152601e60248201527f4765797365723a2066756e64696e6720616d6f756e74206973207a65726f0000604482015290519081900360640190fd5b42811015610964576040805162461bcd60e51b815260206004820152601d60248201527f4765797365723a2066756e64696e672073746172742069732070617374000000604482015290519081900360640190fd5b6002546010116109a55760405162461bcd60e51b815260040180806020018281038252602c815260200180612fa8602c913960400191505060405180910390fd5b6109ae33611ee2565b60006109b8610ed0565b905060008082116109d5576109d085620f4240611f72565b6109f4565b6109f4826109ee87600554611f7290919063ffffffff16565b90611fcb565b600554909150610a04908261200d565b60058190555060026040518060e0016040528087815260200183815260200160008152602001858152602001858152602001610a49878761200d90919063ffffffff16565b8152602001868152509080600181540180825580915050600190039060005260206000209060070201600090919091909150600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c082015181600601555050610b7f337f00000000000000000000000041e1e98ce1189a7c783f879db78e8873b29c1a16877f00000000000000000000000041e1e98ce1189a7c783f879db78e8873b29c1a166001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4257600080fd5b505afa158015610b56573d6000803e3d6000fd5b505050506040513d6020811015610b6c57600080fd5b50516001600160a01b0316929190612067565b7fd3599d59babb3b3382347fcd4e88030d12d499404076688f2fc4efab2d3c4a57858585610bab610ed0565b604080519485526020850193909352838301919091526060830152519081900360800190a15050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b601281565b610c08611ede565b6000546001600160a01b03908116911614610c6a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008111610cbf576040805162461bcd60e51b815260206004820152601f60248201527f4765797365723a20776974686472617720616d6f756e74206973207a65726f00604482015290519081900360640190fd5b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b037f000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab16916370a08231916024808301926020929190829003018186803b158015610d3e57600080fd5b505afa158015610d52573d6000803e3d6000fd5b505050506040513d6020811015610d6857600080fd5b5051811115610da85760405162461bcd60e51b8152600401808060200182810382526027815260200180612ef16027913960400191505060405180910390fd5b610ddc6001600160a01b037f000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab1633836120ef565b6040805182815290517f9893b6ecc024ca2ea684c8b98d392ba3e47fd995e6f6ddddc1b0c7acf5b9dd2b9181900360200190a150565b6001600160a01b0381166000908152600460205260409020545b919050565b60036020526000908152604090208054600182015460029092015490919083565b7f00000000000000000000000000000000000000000000000000000000000d2f0081565b600060065460001415610e8b57506000610e2c565b6006546001600160a01b038316600090815260036020526040902054610ebe91906109ee90610eb86110e9565b90611f72565b92915050565b601081565b6002545b90565b60007f00000000000000000000000041e1e98ce1189a7c783f879db78e8873b29c1a166001600160a01b031663b69ef8a86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b505afa158015610f3f573d6000803e3d6000fd5b505050506040513d6020811015610f5557600080fd5b5051905090565b600090565b60065481565b610f6f611ede565b6000546001600160a01b03908116911614610fd1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60006007546000141561104857506000610ecd565b60075460085461106591906109ee90670de0b6b3a7640000611f72565b905090565b60007f000000000000000000000000598e2164a685f7c02b423e63f0f1334ca28156be6001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b7f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b60007f000000000000000000000000598e2164a685f7c02b423e63f0f1334ca28156be6001600160a01b031663b69ef8a86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b60055481565b6000816111605750670de0b6b3a7640000610e2c565b670de0b6b3a76400008210156111a75760405162461bcd60e51b8152600401808060200182810382526026815260200180612fd46026913960400191505060405180910390fd5b662386f26fc1000060006111c3826111bd611033565b9061200d565b905060006111d1858461200d565b905061121e61120f680100000000000000006109ee670de0b6b3a76400006112066111fe88848987611f72565b600f0b61216f565b600f0b90611f72565b670de0b6b3a76400009061200d565b95945050505050565b6000546001600160a01b031690565b60007f00000000000000000000000000000000000000000000000000000000000d2f00821061129857611291670de0b6b3a76400007f0000000000000000000000000000000000000000000000000de0b6b3a764000061200d565b9050610e2c565b600061133661130f7f00000000000000000000000000000000000000000000000000000000000d2f006109ee86610eb87f0000000000000000000000000000000000000000000000000de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006121a9565b7f00000000000000000000000000000000000000000000000000000000000000009061200d565b905061134a670de0b6b3a76400008261200d565b9392505050565b600260015414156113a9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556113b733611ee2565b60018055565b60095481565b6113ce828242610850565b5050565b60007f0000000000000000000000005530263b1c272af45a38efff0b096eb3d98fe9986001600160a01b031663b69ef8a86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b6004602052816000526040600020818154811061144657fe5b600091825260209091206002909102018054600190910154909250905082565b60008060008060006005546000146114c0576000805b6002548110156114a357611499611492826121eb565b839061200d565b915060010161147c565b506114bc6005546109ee6114b5610ed0565b8490611f72565b9150505b866114e45760008060006114d6846111bd6113d2565b945094509450945050611780565b6114ed88610e76565b87111561152b5760405162461bcd60e51b8152600401808060200182810382526026815260200180612f616026913960400191505060405180910390fd5b60006115456115386110e9565b6006546109ee908b611f72565b90506000811161159c576040805162461bcd60e51b815260206004820181905260248201527f4765797365723a207072657669657720616d6f756e7420746f6f20736d616c6c604482015290519081900360640190fd5b6001600160a01b038916600090815260046020526040812054819081906115c49060016121a9565b90505b83156116d7576001600160a01b038c1660009081526004602052604081208054839081106115f157fe5b90600052602060002090600202019050600061161a8260010154426121a990919063ffffffff16565b9050858260000154101561168657815461163f906116389083611f72565b869061200d565b945061166f611668670de0b6b3a76400006109ee61165c85611236565b8654610eb89087611f72565b859061200d565b825490945061167f9087906121a9565b95506116c3565b6116936116388783611f72565b94506116ba611668670de0b6b3a76400006109ee6116b085611236565b610eb88b87611f72565b935050506116d7565b6116ce8360016121a9565b925050506115c7565b60006116f2670de0b6b3a76400006109ee85610eb88f61114a565b9050600061172b85611725846111bd61171c600654610eb8600a54426121a990919063ffffffff16565b6009549061200d565b906121a9565b90506000611743826109ee85610eb88c6111bd6113d2565b9050600061175d876109ee670de0b6b3a764000087611f72565b905081818861176e8c6111bd6113d2565b9c509c509c509c505050505050505050505b93509350935093565b60085481565b61084a836000612287565b6117a48484612287565b5050505050565b600a5481565b600281815481106117be57fe5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b620f424081565b6000806000806118213361181a33610e76565b6000611466565b935093509350935090919293565b611837611ede565b6000546001600160a01b03908116911614611899576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166118de5760405162461bcd60e51b8152600401808060200182810382526026815260200180612f186026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60007f0000000000000000000000005530263b1c272af45a38efff0b096eb3d98fe9986001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2b57600080fd5b6119b4611ede565b6000546001600160a01b03908116911614611a16576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611a1f33611ee2565b600254600090815b8181101561083a5760006002611a3d83866121a9565b81548110611a4757fe5b6000918252602082206007909102019150611a6283866121a9565b9050611a6d816121eb565b158015611a7e575081600501544210155b15611bd65781546006830154600484015460408051938452602084019290925282820152517f3bdea4ef9f7e20da64d7c2f1e5fca1178145d56d25bad0e0a23d7a209261fe7b9181900360600190a160028054611adc9060016121a9565b81548110611ae657fe5b906000526020600020906007020160028281548110611b0157fe5b9060005260206000209060070201600082015481600001556001820154816001015560028201548160020155600382015481600301556004820154816004015560058201548160050155600682015481600601559050506002805480611b6357fe5b60008281526020812060077fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909301928302018181556001818101839055600282018390556003820183905560048201839055600582018390556006909101919091559155611bd390869061200d565b94505b5050600101611a27565b60026001541415611c38576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015580611c8f576040805162461bcd60e51b815260206004820152601c60248201527f4765797365723a207374616b6520616d6f756e74206973207a65726f00000000604482015290519081900360640190fd5b6001600160a01b038216611cd45760405162461bcd60e51b8152600401808060200182810382526023815260200180612f3e6023913960400191505060405180910390fd5b60008060065411611cf157611cec82620f4240611f72565b611d09565b611d09611cfc6110e9565b6006546109ee9085611f72565b905060008111611d60576040805162461bcd60e51b815260206004820152601e60248201527f4765797365723a207374616b6520616d6f756e7420746f6f20736d616c6c0000604482015290519081900360640190fd5b611d6983611ee2565b6001600160a01b03831660009081526003602052604090208054611d8d908361200d565b81554260028083018290556001600160a01b03861660009081526004602090815260408083208151808301909252878252818301958652805460018181018355918552929093209051919093029092019182559151910155600654611df2908361200d565b600681905550611e77857f000000000000000000000000598e2164a685f7c02b423e63f0f1334ca28156be857f000000000000000000000000598e2164a685f7c02b423e63f0f1334ca28156be6001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4257600080fd5b836001600160a01b03167fc65e53b88159e7d2c0fc12a0600072e28ae53ff73b4c1715369c30f16093514284611eac87610e76565b6040805192835260208301919091526060828201819052600090830152519081900360a00190a2505060018055505050565b3390565b611eea612657565b6000611f07600654610eb8600a54426121a990919063ffffffff16565b600954909150611f17908261200d565b60095542600a8190556001600160a01b0383166000908152600360205260408120805460028201549193611f4f92610eb891906121a9565b6001830154909150611f61908261200d565b600183015550426002909101555050565b600082611f8157506000610ebe565b82820282848281611f8e57fe5b041461134a5760405162461bcd60e51b8152600401808060200182810382526021815260200180612f876021913960400191505060405180910390fd5b600061134a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061280d565b60008282018381101561134a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261084a9085906128af565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261083a9084906128af565b60008082600f0b1361218057600080fd5b608061218b83612960565b600f0b6f4d104d427de7fce20a6e420e0223674802901c9050919050565b600061134a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612a71565b600080600283815481106121fb57fe5b906000526020600020906007020190508060040154421015612221576000915050610e2c565b806001015481600201541061223a576000915050610e2c565b806005015442106122605760028101546001820154612258916121a9565b915050610e2c565b61134a81600601546109ee8360010154610eb88560030154426121a990919063ffffffff16565b6000600260015414156122e1576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015582612338576040805162461bcd60e51b815260206004820152601e60248201527f4765797365723a20756e7374616b6520616d6f756e74206973207a65726f0000604482015290519081900360640190fd5b8261234233610e76565b101561237f5760405162461bcd60e51b81526004018080602001828103825260268152602001806130246026913960400191505060405180910390fd5b61238833611ee2565b600061239384612acb565b905060006123b0670de0b6b3a76400006109ee84610eb88861114a565b905060006123d86123cc8360095461200d90919063ffffffff16565b6109ee84610eb86113d2565b905084156123f1576008546123ed908261200d565b6008555b6007546123fe908261200d565b600755604080517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810188905290516001600160a01b037f000000000000000000000000598e2164a685f7c02b423e63f0f1334ca28156be169163a9059cbb91604480830192600092919082900301818387803b15801561248857600080fd5b505af115801561249c573d6000803e3d6000fd5b50505050336001600160a01b03167faf01bfc8475df280aca00b578c4a948e6d95700f0db8c13365240f7f973c8754876124d533610e76565b6040805192835260208301919091526060828201819052600090830152519081900360a00190a280156125d857604080517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b037f0000000000000000000000005530263b1c272af45a38efff0b096eb3d98fe998169163a9059cbb91604480830192600092919082900301818387803b15801561258957600080fd5b505af115801561259d573d6000803e3d6000fd5b50506040805184815290513393507fdf29796aad820e4bb192f3a8d631b76519bcd2cbe77cc85af20e9df53cece08692509081900360200190a25b841561264a576126136001600160a01b037f000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab16333088612067565b60408051868152905133917fc16aaa1ae5a136c89a5275f4f29944ca4f17d3815f9122eae9455ae495b4c76f919081900360200190a25b6001805595945050505050565b600080612662610ed0565b90506005546000141561267757809150612712565b6000805b6002548110156126eb576000612690826121eb565b90506000600283815481106126a157fe5b9060005260206000209060070201905060008211156126e15760028101546126c9908361200d565b60028201554260038201556126de848361200d565b93505b505060010161267b565b506005546126fd906109ee8385611f72565b60055490935061270d90826121a9565b600555505b81156113ce577f00000000000000000000000041e1e98ce1189a7c783f879db78e8873b29c1a166001600160a01b031663a9059cbb7f0000000000000000000000005530263b1c272af45a38efff0b096eb3d98fe998846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156127af57600080fd5b505af11580156127c3573d6000803e3d6000fd5b505050507f05b6b33aa8c89542004be445284c4d44c5f3654d65638da167510824426020dd826127f16113d2565b6040805192835260208301919091528051918290030190a15050565b600081836128995760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561285e578181015183820152602001612846565b50505050905090810190601f16801561288b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816128a557fe5b0495945050505050565b6060612904826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d159092919063ffffffff16565b80519091501561083a5780806020019051602081101561292357600080fd5b505161083a5760405162461bcd60e51b815260040180806020018281038252602a815260200180612ffa602a913960400191505060405180910390fd5b60008082600f0b1361297157600080fd5b6000600f83900b680100000000000000008112612990576040918201911d5b64010000000081126129a4576020918201911d5b6201000081126129b6576010918201911d5b61010081126129c7576008918201911d5b601081126129d7576004918201911d5b600481126129e7576002918201911d5b600281126129f6576001820191505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0820160401b6000607f849003600f87900b82821215612a3257fe5b901b90506780000000000000005b6000811315612a665790800260ff81901c8281029390930192607f011c9060011d612a40565b509095945050505050565b60008184841115612ac35760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561285e578181015183820152602001612846565b505050900390565b600080612ae6612ad96110e9565b6006546109ee9086611f72565b905060008111612b3d576040805162461bcd60e51b815260206004820181905260248201527f4765797365723a20756e7374616b6520616d6f756e7420746f6f20736d616c6c604482015290519081900360640190fd5b336000908152600460205260408120829082905b8215612cb257805460009082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110612b8a57fe5b906000526020600020906002020190506000612bb38260010154426121a990919063ffffffff16565b90506000612bc082611236565b905085836000015411612c68578254612bf19061163890670de0b6b3a7640000906109ee908590610eb89088611f72565b8354909550612c0b90612c049084611f72565b889061200d565b8354909750612c1b9087906121a9565b955083805480612c2757fe5b60008281526020812060027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90930192830201818155600101559055612caa565b612c85611638670de0b6b3a76400006109ee84610eb88b88611f72565b9450612c94612c048784611f72565b8354909750612ca390876121a9565b8355600095505b505050612b51565b3360009081526003602052604090206001810154612cd090866121a9565b60018201558054612ce190876121a9565b8155426002820155600954612cf690866121a9565b600955600654612d0690876121a9565b60065550909695505050505050565b6060612d248484600085612d2c565b949350505050565b6060612d3785612eb7565b612d88576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612de557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612da8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612e47576040519150601f19603f3d011682016040523d82523d6000602084013e612e4c565b606091505b50915091508115612e60579150612d249050565b805115612e705780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561285e578181015183820152602001612846565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612d2457505015159291505056fe4765797365723a20776974686472617720616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734765797365723a2062656e6566696369617279206973207a65726f20616464726573734765797365723a207072657669657720616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774765797365723a2065786365656473206d6178206163746976652066756e64696e67207363686564756c65734765797365723a204759535220616d6f756e74206973206265747765656e203020616e6420315361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644765797365723a20756e7374616b6520616d6f756e7420657863656564732062616c616e6365a264697066735822122040245f7f8574bc32c1d8a39e2a30f6b652090bce752afe38defb2fe08530ff5964736f6c634300060c0033

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

000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000d2f00000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab

-----Decoded View---------------
Arg [0] : stakingToken_ (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [1] : rewardToken_ (address): 0xbEa98c05eEAe2f3bC8c3565Db7551Eb738c8CCAb
Arg [2] : bonusMin_ (uint256): 0
Arg [3] : bonusMax_ (uint256): 1000000000000000000
Arg [4] : bonusPeriod_ (uint256): 864000
Arg [5] : gysr_ (address): 0xbEa98c05eEAe2f3bC8c3565Db7551Eb738c8CCAb

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [1] : 000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000d2f00
Arg [5] : 000000000000000000000000bea98c05eeae2f3bc8c3565db7551eb738c8ccab


Deployed Bytecode Sourcemap

32968:24239:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34419:27;;;:::i;:::-;;;;;;;;;;;;;;;;35748:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35748:122:0;;-1:-1:-1;35748:122:0;-1:-1:-1;35748:122:0;:::i;:::-;;35925:167;;;;;;;;;;;;;;;;-1:-1:-1;;;;;35925:167:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35925:167:0;;-1:-1:-1;35925:167:0;-1:-1:-1;35925:167:0;:::i;37613:1442::-;;;;;;;;;;;;;;;;-1:-1:-1;37613:1442:0;;;;;;;;;;;;:::i;34187:33::-;;;:::i;33656:43::-;;;:::i;39109:387::-;;;;;;;;;;;;;;;;-1:-1:-1;39109:387:0;;:::i;52744:113::-;;;;;;;;;;;;;;;;-1:-1:-1;52744:113:0;-1:-1:-1;;;;;52744:113:0;;:::i;34058:42::-;;;;;;;;;;;;;;;;-1:-1:-1;34058:42:0;-1:-1:-1;;;;;34058:42:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;34267:36;;;:::i;36307:297::-;;;;;;;;;;;;;;;;-1:-1:-1;36307:297:0;-1:-1:-1;;;;;36307:297:0;;:::i;33769:48::-;;;:::i;52534:95::-;;;:::i;52172:100::-;;;:::i;27053:96::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;34379:33;;;:::i;20910:148::-;;;:::i;51850:199::-;;;:::i;37093:118::-;;;:::i;:::-;;;;-1:-1:-1;;;;;37093:118:0;;;;;;;;;;;;;;34227:33;;;:::i;36659:110::-;;;:::i;34340:32::-;;;:::i;51101:650::-;;;;;;;;;;;;;;;;-1:-1:-1;51101:650:0;;:::i;20268:79::-;;;:::i;50485:420::-;;;;;;;;;;;;;;;;-1:-1:-1;50485:420:0;;:::i;39760:87::-;;;:::i;34491:39::-;;;:::i;37437:122::-;;;;;;;;;;;;;;;;-1:-1:-1;37437:122:0;;;;;;;:::i;52353:104::-;;;:::i;34107:45::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34107:45:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;53888:3316;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;53888:3316:0;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34453:31;;;:::i;36147:105::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36147:105:0;;-1:-1:-1;36147:105:0;-1:-1:-1;36147:105:0;:::i;39550:156::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39550:156:0;;-1:-1:-1;39550:156:0;-1:-1:-1;39550:156:0;:::i;34537:26::-;;;:::i;33996:25::-;;;;;;;;;;;;;;;;-1:-1:-1;33996:25:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33706:56;;;:::i;53172:247::-;;;:::i;21213:244::-;;;;;;;;;;;;;;;;-1:-1:-1;21213:244:0;-1:-1:-1;;;;;21213:244:0;;:::i;37265:118::-;;;:::i;39901:965::-;;;:::i;34419:27::-;;;;:::o;35748:122::-;35824:38;35831:10;35843;35855:6;35824;:38::i;:::-;35748:122;;;:::o;35925:167::-;36052:32;36059:10;36071:4;36077:6;36052;:32::i;:::-;35925:167;;;;:::o;37613:1442::-;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37785:1:::1;37776:6;:10;37768:53;;;::::0;;-1:-1:-1;;;37768:53:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;37849:15;37840:5;:24;;37832:66;;;::::0;;-1:-1:-1;;;37832:66:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;37931:8;:15:::0;33815:2:::1;-1:-1:-1::0;37909:131:0::1;;;;-1:-1:-1::0;;;37909:131:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38084:19;38092:10;38084:7;:19::i;:::-;38156:20;38179:13;:11;:13::i;:::-;38156:36;;38203:26;38248:1:::0;38233:12:::1;:16;38232:133;;38329:36;:6:::0;33757:5:::1;38329:10;:36::i;:::-;38232:133;;;38266:47;38300:12;38266:29;38288:6;38266:17;;:21;;:29;;;;:::i;:::-;:33:::0;::::1;:47::i;:::-;38398:17;::::0;38203:162;;-1:-1:-1;38398:41:0::1;::::0;38203:162;38398:21:::1;:41::i;:::-;38378:17;:61;;;;38483:8;38511:280;;;;;;;;38546:6;38511:280;;;;38579:18;38511:280;;;;38626:1;38511:280;;;;38659:5;38511:280;;;;38690:5;38511:280;;;;38719:19;38729:8;38719:5;:9;;:19;;;;:::i;:::-;38511:280;;;;38767:8;38511:280;;::::0;38483:319:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38850:128;38901:10;38934:11;38961:6;38850:11;-1:-1:-1::0;;;;;38850:17:0::1;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;38850:19:0;-1:-1:-1;;;;;38850:36:0::1;::::0;:128;;:36:::1;:128::i;:::-;38994:53;39008:6;39016:8;39026:5;39033:13;:11;:13::i;:::-;38994:53;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;::::1;20550:1;;37613:1442:::0;;;:::o;34187:33::-;;;:::o;33656:43::-;33697:2;33656:43;:::o;39109:387::-;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39199:1:::1;39190:6;:10;39182:54;;;::::0;;-1:-1:-1;;;39182:54:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;39279:30;::::0;;;;;39303:4:::1;39279:30;::::0;::::1;::::0;;;-1:-1:-1;;;;;39279:5:0::1;:15;::::0;::::1;::::0;:30;;;;;::::1;::::0;;;;;;;;:15;:30;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;39279:30:0;39269:40;::::1;;39247:129;;;;-1:-1:-1::0;;;39247:129:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39411:38;-1:-1:-1::0;;;;;39411:5:0::1;:18;39430:10;39442:6:::0;39411:18:::1;:38::i;:::-;39467:21;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;39109:387:::0;:::o;52744:113::-;-1:-1:-1;;;;;52826:16:0;;52799:7;52826:16;;;:10;:16;;;;;:23;52744:113;;;;:::o;34058:42::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;34267:36::-;;;:::o;36307:297::-;36411:7;36440:18;;36462:1;36440:23;36436:64;;;-1:-1:-1;36487:1:0;36480:8;;36436:64;36577:18;;-1:-1:-1;;;;;36548:16:0;;;;;;:10;:16;;;;;:23;36530:66;;36577:18;36530:42;;:13;:11;:13::i;:::-;:17;;:42::i;:66::-;36510:86;36307:297;-1:-1:-1;;36307:297:0:o;33769:48::-;33815:2;33769:48;:::o;52534:95::-;52606:8;:15;52534:95;;:::o;52172:100::-;52216:7;52243:11;-1:-1:-1;;;;;52243:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;52243:21:0;;-1:-1:-1;52172:100:0;:::o;27053:96::-;27112:4;27053:96;:::o;34379:33::-;;;;:::o;20910:148::-;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21017:1:::1;21001:6:::0;;20980:40:::1;::::0;-1:-1:-1;;;;;21001:6:0;;::::1;::::0;20980:40:::1;::::0;21017:1;;20980:40:::1;21048:1;21031:19:::0;;;::::1;::::0;;20910:148::o;51850:199::-;51888:7;51912:12;;51928:1;51912:17;51908:58;;;-1:-1:-1;51953:1:0;51946:8;;51908:58;52028:12;;51983:16;;:58;;52028:12;51983:40;;52004:18;51983:20;:40::i;:58::-;51976:65;;51850:199;:::o;37093:118::-;37147:7;37182:12;-1:-1:-1;;;;;37182:18:0;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34227:33;;;:::o;36659:110::-;36712:7;36739:12;-1:-1:-1;;;;;36739:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34340:32;;;;:::o;51101:650::-;51155:7;51179:9;51175:67;;-1:-1:-1;51212:18:0;51205:25;;51175:67;51282:18;51274:26;;;51252:114;;;;-1:-1:-1;;;51252:114:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51404:24;51379:14;51460:19;51404:24;51460:7;:5;:7::i;:::-;:11;;:19::i;:::-;51448:31;-1:-1:-1;51490:9:0;51502:16;:4;51511:6;51502:8;:16::i;:::-;51490:28;-1:-1:-1;51551:192:0;51601:127;51722:5;51601:94;51676:18;51609:39;51616:19;51633:1;51601:94;51490:28;51722:5;51616;:12::i;:19::-;51609:37;;;:39::i;:::-;51601:48;;;:74;:94::i;:127::-;51559:18;;51551:31;:192::i;:::-;51531:212;51101:650;-1:-1:-1;;;;;51101:650:0:o;20268:79::-;20306:7;20333:6;-1:-1:-1;;;;;20333:6:0;20268:79;:::o;50485:420::-;50539:7;50571:11;50563:4;:19;50559:100;;50606:41;50614:18;50638:8;50606:31;:41::i;:::-;50599:48;;;;50559:100;50736:13;50752:89;50779:51;50818:11;50779:34;50808:4;50780:22;:8;50793;50780:12;:22::i;50779:51::-;50752:8;;:12;:89::i;:::-;50736:105;-1:-1:-1;50859:38:0;50867:18;50736:105;50859:31;:38::i;:::-;50852:45;50485:420;-1:-1:-1;;;50485:420:0:o;39760:87::-;23199:1;23805:7;;:19;;23797:63;;;;;-1:-1:-1;;;23797:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;23199:1;23938:7;:18;39820:19:::1;39828:10;39820:7;:19::i;:::-;23155:1:::0;24117:22;;39760:87::o;34491:39::-;;;;:::o;37437:122::-;37512:39;37517:6;37525:8;37535:15;37512:4;:39::i;:::-;37437:122;;:::o;52353:104::-;52399:7;52426:13;-1:-1:-1;;;;;52426:21:0;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34107:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34107:45:0;-1:-1:-1;34107:45:0;:::o;53888:3316::-;54045:7;54067;54089;54111;54200:21;54240:17;;54261:1;54240:22;54236:346;;54279:22;54325:9;54320:132;54344:8;:15;54340:19;;54320:132;;;54402:34;54421:14;54433:1;54421:11;:14::i;:::-;54402;;:18;:34::i;:::-;54385:51;-1:-1:-1;54361:3:0;;54320:132;;;;54482:88;54538:17;;54482:33;54501:13;:11;:13::i;:::-;54482:14;;:18;:33::i;:88::-;54466:104;;54236:346;;54652:11;54648:96;;54688:1;54691;54694;54697:34;54717:13;54697:15;:13;:15::i;:34::-;54680:52;;;;;;;;;;;54648:96;54821:20;54836:4;54821:14;:20::i;:::-;54811:6;:30;;54789:118;;;;-1:-1:-1;;;54789:118:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54965:14;54982:49;55017:13;:11;:13::i;:::-;54982:18;;:30;;55005:6;54982:22;:30::i;:49::-;54965:66;;55059:1;55050:6;:10;55042:55;;;;;-1:-1:-1;;;55042:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;55280:16:0;;55110:23;55280:16;;;:10;:16;;;;;:23;55110;;;;55280:30;;55308:1;55280:27;:30::i;:::-;55268:42;;55321:956;55328:10;;55321:956;;-1:-1:-1;;;;;55373:16:0;;55355:15;55373:16;;;:10;:16;;;;;:19;;55390:1;;55373:19;;;;;;;;;;;;;;;;55355:37;;55407:12;55422:32;55442:1;:11;;;55422:15;:19;;:32;;;;:::i;:::-;55407:47;;55486:6;55475:1;:8;;;:17;55471:723;;;55551:8;;55531:39;;55551:18;;55564:4;55551:12;:18::i;:::-;55531:15;;:19;:39::i;:::-;55513:57;-1:-1:-1;55613:178:0;55661:111;55731:18;55661:39;55684:15;55694:4;55684:9;:15::i;:::-;55661:8;;:18;;55674:4;55661:12;:18::i;:111::-;55613:21;;:25;:178::i;:::-;55830:8;;55589:202;;-1:-1:-1;55819:20:0;;:6;;:10;:20::i;:::-;55810:29;;55471:723;;;55898:37;55918:16;:6;55929:4;55918:10;:16::i;55898:37::-;55880:55;-1:-1:-1;55978:176:0;56026:109;56094:18;56026:37;56047:15;56057:4;56047:9;:15::i;:::-;56026:16;:6;56037:4;56026:10;:16::i;55978:176::-;55954:200;;56173:5;;;;55471:723;56257:8;:1;56263;56257:5;:8::i;:::-;56253:12;;55321:956;;;;;56318:29;56350:94;56425:18;56350:56;56384:21;56350:15;56360:4;56350:9;:15::i;:94::-;56318:126;;56511:33;56547:178;56709:15;56547:143;56668:21;56547:102;56590:58;56629:18;;56591:32;56611:11;;56591:15;:19;;:32;;;;:::i;56590:58::-;56547:24;;;:42;:102::i;:143::-;:161;;:178::i;:::-;56511:214;;56738:14;56755:122;56851:25;56755:77;56810:21;56756:34;56776:13;56756:15;:13;:15::i;56755:122::-;56738:139;-1:-1:-1;56926:13:0;56942:103;57029:15;56942:68;56950:18;56988:21;56942:45;:68::i;:103::-;56926:119;;57080:6;57101:5;57121:15;57151:34;57171:13;57151:15;:13;:15::i;:34::-;57058:138;;;;;;;;;;;;;;;;;53888:3316;;;;;;;;:::o;34453:31::-;;;;:::o;36147:105::-;36225:19;36234:6;36242:1;36225:8;:19::i;39550:156::-;39676:22;39685:6;39693:4;39676:8;:22::i;:::-;;39550:156;;;;:::o;34537:26::-;;;;:::o;33996:25::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;33706:56::-;33757:5;33706:56;:::o;53172:247::-;53253:7;53275;53297;53319;53361:50;53369:10;53381:26;53396:10;53381:14;:26::i;:::-;53409:1;53361:7;:50::i;:::-;53354:57;;;;;;;;53172:247;;;;:::o;21213:244::-;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21302:22:0;::::1;21294:73;;;;-1:-1:-1::0;;;21294:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21404:6;::::0;;21383:38:::1;::::0;-1:-1:-1;;;;;21383:38:0;;::::1;::::0;21404:6;::::1;::::0;21383:38:::1;::::0;::::1;21432:6;:17:::0;;;::::1;-1:-1:-1::0;;;;;21432:17:0;;;::::1;::::0;;;::::1;::::0;;21213:244::o;37265:118::-;37318:7;37353:13;-1:-1:-1;;;;;37353:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39901:965;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39988:19:::1;39996:10;39988:7;:19::i;:::-;40129:8;:15:::0;40076::::1;::::0;;40155:704:::1;40179:12;40175:1;:16;40155:704;;;40213:23;40239:8;40248:14;:1:::0;40254:7;40248:5:::1;:14::i;:::-;40239:24;;;;;;;;;::::0;;;::::1;::::0;;::::1;::::0;;::::1;;::::0;-1:-1:-1;40292:14:0::1;:1:::0;40298:7;40292:5:::1;:14::i;:::-;40278:28;;40327:16;40339:3;40327:11;:16::i;:::-;:21:::0;:55;::::1;;;;40371:7;:11;;;40352:15;:30;;40327:55;40323:525;;;40445:14:::0;;40482:16:::1;::::0;::::1;::::0;40521:13:::1;::::0;::::1;::::0;40408:145:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;::::1;::::0;;;;;;;::::1;40724:8;40733:15:::0;;:22:::1;::::0;40753:1:::1;40733:19;:22::i;:::-;40724:32;;;;;;;;;;;;;;;;;;40708:8;40717:3;40708:13;;;;;;;;;;;;;;;;;;:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40775:8;:14;;;;;;;;::::0;;;::::1;::::0;;::::1;::::0;;;;;;::::1;;::::0;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;::::1;::::0;::::1;::::0;;;::::1;::::0;::::1;::::0;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;::::1;::::0;;;;;;40818::::1;::::0;:7;;:11:::1;:14::i;:::-;40808:24;;40323:525;-1:-1:-1::0;;40193:3:0::1;;40155:704;;41160:1389:::0;23199:1;23805:7;;:19;;23797:63;;;;;-1:-1:-1;;;23797:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;23199:1;23938:7;:18;41324:10;41316:51:::1;;;::::0;;-1:-1:-1;;;41316:51:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;41400:25:0;::::1;41378:110;;;;-1:-1:-1::0;;;41378:110:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41549:27;41601:1:::0;41580:18:::1;;:22;41579:141;;41684:36;:6:::0;33757:5:::1;41684:10;:36::i;:::-;41579:141;;;41619:49;41654:13;:11;:13::i;:::-;41619:18;::::0;:30:::1;::::0;41642:6;41619:22:::1;:30::i;:49::-;41549:171;;41761:1;41739:19;:23;41731:66;;;::::0;;-1:-1:-1;;;41731:66:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;41841:20;41849:11;41841:7;:20::i;:::-;-1:-1:-1::0;;;;;41931:23:0;::::1;41911:17;41931:23:::0;;;:10:::1;:23;::::0;;;;41979:11;;:36:::1;::::0;41995:19;41979:15:::1;:36::i;:::-;41965:50:::0;;42045:15:::1;42026:16;::::0;;::::1;:34:::0;;;-1:-1:-1;;;;;42073:23:0;::::1;41965:11;42073:23:::0;;;:10:::1;:23;::::0;;;;;;;42116:43;;;;::::1;::::0;;;;;;;;::::1;::::0;;;42073:97;;::::1;::::0;;::::1;::::0;;;;;;;;;;;;;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;42256:18:::1;::::0;:43:::1;::::0;42122:19;42256:22:::1;:43::i;:::-;42235:18;:64;;;;42337:126;42389:6;42418:12;42446:6;42337:12;-1:-1:-1::0;;;;;42337:18:0::1;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;:126;42488:11;-1:-1:-1::0;;;;;42481:60:0::1;;42501:6;42509:27;42524:11;42509:14;:27::i;:::-;42481:60;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;-1:-1:-1;42481:60:0;;;;;;;;;;;;::::1;-1:-1:-1::0;;23155:1:0;24117:22;;-1:-1:-1;;;41160:1389:0:o;18820:106::-;18908:10;18820:106;:::o;47405:695::-;47455:15;:13;:15::i;:::-;47513:30;47546:82;47599:18;;47547:32;47567:11;;47547:15;:19;;:32;;;;:::i;47546:82::-;47666:24;;47513:115;;-1:-1:-1;47666:76:0;;47513:115;47666:28;:76::i;:::-;47639:24;:103;47767:15;47753:11;:29;;;-1:-1:-1;;;;;47843:16:0;;-1:-1:-1;47843:16:0;;;:10;:16;;;;;47960:11;;47923:16;;;;47843;;47902:70;;47903:37;;47767:15;47903:19;:37::i;47902:70::-;48003:17;;;;47870:102;;-1:-1:-1;48003:44:0;;47870:102;48003:21;:44::i;:::-;47983:17;;;:64;-1:-1:-1;48077:15:0;48058:16;;;;:34;-1:-1:-1;;47405:695:0:o;2310:471::-;2368:7;2613:6;2609:47;;-1:-1:-1;2643:1:0;2636:8;;2609:47;2680:5;;;2684:1;2680;:5;:1;2704:5;;;;;:10;2696:56;;;;-1:-1:-1;;;2696:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3257:132;3315:7;3342:39;3346:1;3349;3342:39;;;;;;;;;;;;;;;;;:3;:39::i;956:181::-;1014:7;1046:5;;;1070:6;;;;1062:46;;;;;-1:-1:-1;;;1062:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;15306:205;15434:68;;;-1:-1:-1;;;;;15434:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15457:27;15434:68;;;15407:96;;15427:5;;15407:19;:96::i;15121:177::-;15231:58;;;-1:-1:-1;;;;;15231:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15254:23;15231:58;;;15204:86;;15224:5;;15204:19;:86::i;32034:253::-;32086:6;32117:1;32113;:5;;;32105:14;;;;;;32261:3;32186:11;32195:1;32186:8;:11::i;:::-;32178:20;;32201:34;32178:57;32177:87;;32132:147;;32034:253;;;:::o;1420:136::-;1478:7;1505:43;1509:1;1512;1505:43;;;;;;;;;;;;;;;;;:3;:43::i;49576:696::-;49632:7;49652:23;49678:8;49687:3;49678:13;;;;;;;;;;;;;;;;;;49652:39;;49768:7;:13;;;49750:15;:31;49746:72;;;49805:1;49798:8;;;;;49746:72;49870:7;:14;;;49850:7;:16;;;:34;49846:75;;49908:1;49901:8;;;;;49846:75;50033:7;:11;;;50014:15;:30;50010:106;;50087:16;;;;50068:14;;;;:36;;:18;:36::i;:::-;50061:43;;;;;50010:106;50148:116;50233:7;:16;;;50148:62;50195:7;:14;;;50149:40;50169:7;:19;;;50149:15;:19;;:40;;;;:::i;42808:1637::-;42913:7;23199:1;23805:7;;:19;;23797:63;;;;;-1:-1:-1;;;23797:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;23199:1;23938:7;:18;42967:10;42959:53:::1;;;::::0;;-1:-1:-1;;;42959:53:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;43075:6;43045:26;43060:10;43045:14;:26::i;:::-;:36;;43023:124;;;;-1:-1:-1::0;;;43023:124:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43191:19;43199:10;43191:7;:19::i;:::-;43290:32;43325:30;43348:6;43325:22;:30::i;:::-;43290:65:::0;-1:-1:-1;43415:32:0::1;43450:97;43528:18:::0;43450:59:::1;43290:65:::0;43450:15:::1;43460:4:::0;43450:9:::1;:15::i;:97::-;43415:132;;43560:20;43583:133;43661:54;43690:24;43661;;:28;;:54;;;;:::i;:::-;43583:59;43617:24;43583:15;:13;:15::i;:133::-;43560:156:::0;-1:-1:-1;43783:8:0;;43779:94:::1;;43827:16;::::0;:34:::1;::::0;43848:12;43827:20:::1;:34::i;:::-;43808:16;:53:::0;43779:94:::1;43898:12;::::0;:30:::1;::::0;43915:12;43898:16:::1;:30::i;:::-;43883:12;:45:::0;43966:41:::1;::::0;;;;;43988:10:::1;43966:41;::::0;::::1;::::0;;;;;;;;;-1:-1:-1;;;;;43966:12:0::1;:21;::::0;::::1;::::0;:41;;;;;-1:-1:-1;;43966:41:0;;;;;;;-1:-1:-1;43966:21:0;:41;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;44032:10;-1:-1:-1::0;;;;;44023:60:0::1;;44044:6;44052:26;44067:10;44052:14;:26::i;:::-;44023:60;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;-1:-1:-1;44023:60:0;;;;;;;;;;;;::::1;44098:16:::0;;44094:161:::1;;44131:48;::::0;;;;;44154:10:::1;44131:48;::::0;::::1;::::0;;;;;;;;;-1:-1:-1;;;;;44131:13:0::1;:22;::::0;::::1;::::0;:48;;;;;-1:-1:-1;;44131:48:0;;;;;;;-1:-1:-1;44131:22:0;:48;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;44199:44:0::1;::::0;;;;;;;44218:10:::1;::::0;-1:-1:-1;44199:44:0::1;::::0;-1:-1:-1;44199:44:0;;;;::::1;::::0;;::::1;44094:161;44269:8:::0;;44265:143:::1;;44294:55;-1:-1:-1::0;;;;;44294:5:0::1;:22;44317:10;44337:4;44344::::0;44294:22:::1;:55::i;:::-;44369:27;::::0;;;;;;;44379:10:::1;::::0;44369:27:::1;::::0;;;;;::::1;::::0;;::::1;44265:143;23155:1:::0;24117:22;;44425:12;42808:1637;-1:-1:-1;;;;;42808:1637:0:o;48188:1205::-;48232:22;48269:20;48292:13;:11;:13::i;:::-;48269:36;;48322:17;;48343:1;48322:22;48318:877;;;48414:12;48397:29;;48318:877;;;48534:22;48580:9;48575:418;48599:8;:15;48595:19;;48575:418;;;48640:14;48657;48669:1;48657:11;:14::i;:::-;48640:31;;48690:23;48716:8;48725:1;48716:11;;;;;;;;;;;;;;;;;;48690:37;;48759:1;48750:6;:10;48746:232;;;48804:16;;;;:28;;48825:6;48804:20;:28::i;:::-;48785:16;;;:47;48877:15;48855:19;;;:37;48932:26;:14;48951:6;48932:18;:26::i;:::-;48915:43;;48746:232;-1:-1:-1;;48616:3:0;;48575:418;;;-1:-1:-1;49079:17:0;;49024:87;;:32;:14;49043:12;49024:18;:32::i;:87::-;49146:17;;49007:104;;-1:-1:-1;49146:37:0;;49168:14;49146:21;:37::i;:::-;49126:17;:57;-1:-1:-1;48318:877:0;49211:18;;49207:179;;49246:11;-1:-1:-1;;;;;49246:20:0;;49275:13;49291:14;49246:60;;;;;;;;;;;;;-1:-1:-1;;;;;49246:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49326:48;49342:14;49358:15;:13;:15::i;:::-;49326:48;;;;;;;;;;;;;;;;;;;;;;48188:1205;;:::o;3885:278::-;3971:7;4006:12;3999:5;3991:28;;;;-1:-1:-1;;;3991:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4030:9;4046:1;4042;:5;;;;;;;3885:278;-1:-1:-1;;;;;3885:278:0:o;17426:761::-;17850:23;17876:69;17904:4;17876:69;;;;;;;;;;;;;;;;;17884:5;-1:-1:-1;;;;;17876:27:0;;;:69;;;;;:::i;:::-;17960:17;;17850:95;;-1:-1:-1;17960:21:0;17956:224;;18102:10;18091:30;;;;;;;;;;;;;;;-1:-1:-1;18091:30:0;18083:85;;;;-1:-1:-1;;;18083:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30196:1079;30247:6;30278:1;30274;:5;;;30266:14;;;;;;30293:10;30318:13;;;;30352:19;30346:25;;30342:91;;30395:2;30412:9;;;;30388;30342:91;30453:11;30447:2;:17;30443:83;;30488:2;30505:9;;;;30481;30443:83;30546:7;30540:2;:13;30536:79;;30577:2;30594:9;;;;30570;30536:79;30635:5;30629:2;:11;30625:75;;30664:1;30680:8;;;;30657;30625:75;30720:4;30714:2;:10;30710:74;;30748:1;30764:8;;;;30741;30710:74;30804:3;30798:2;:9;30794:73;;30831:1;30847:8;;;;30824;30794:73;30887:3;30881:2;:9;30877:23;;30899:1;30892:8;;;;30877:23;30961:8;;;30974:2;30960:16;30944:13;31015:3;:9;;;31000:10;;;;:25;;;;;;;;;;;-1:-1:-1;31054:18:0;31036:198;31080:1;31074:3;:7;31036:198;;;31109:8;;;31150:3;31144:9;;;31207:15;;;31197:25;;;;;31175:3;:7;31168:14;;31091:1;31083:9;31036:198;;;-1:-1:-1;31260:6:0;;30196:1079;-1:-1:-1;;;;;30196:1079:0:o;1859:192::-;1945:7;1981:12;1973:6;;;;1965:29;;;;-1:-1:-1;;;1965:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2017:5:0;;;1859:192::o;44801:2469::-;44866:7;44886:27;44916:73;44965:13;:11;:13::i;:::-;44916:18;;:30;;44939:6;44916:22;:30::i;:73::-;44886:103;;45030:1;45008:19;:23;45000:68;;;;;-1:-1:-1;;;45000:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45331:10;45149:26;45320:22;;;:10;:22;;;;;45217:19;;45149:26;;45353:1383;45360:20;;45353:1383;;45430:13;;45397:23;;45423:6;;45430:17;;;;45423:25;;;;;;;;;;;;;;;;45397:51;;45463:17;45483:40;45503:9;:19;;;45483:15;:19;;:40;;;;:::i;:::-;45463:60;;45540:13;45556:20;45566:9;45556;:20::i;:::-;45540:36;;45617:16;45597:9;:16;;;:36;45593:1132;;45780:16;;45728:185;;45780:114;;45853:18;;45780:42;;45816:5;;45780:31;;45801:9;45780:20;:31::i;45728:185::-;45998:16;;45700:213;;-1:-1:-1;45953:95:0;;45998:31;;46019:9;45998:20;:31::i;:::-;45953:18;;:22;:95::i;:::-;46107:16;;45932:116;;-1:-1:-1;46086:38:0;;:16;;:20;:38::i;:::-;46067:57;;46143:6;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45593:1132;;;46274:185;46326:114;46399:18;46326:42;46362:5;46326:31;:16;46347:9;46326:20;:31::i;46274:185::-;46246:213;-1:-1:-1;46499:95:0;46544:31;:16;46565:9;46544:20;:31::i;46499:95::-;46632:16;;46478:116;;-1:-1:-1;46632:38:0;;46653:16;46632:20;:38::i;:::-;46613:57;;:16;;-1:-1:-1;45593:1132:0;45353:1383;;;;;;46808:10;46777:17;46797:22;;;:10;:22;;;;;46850:17;;;;:41;;46872:18;46850:21;:41::i;:::-;46830:17;;;:61;46916:11;;:36;;46932:19;46916:15;:36::i;:::-;46902:50;;46982:15;46963:16;;;:34;47070:24;;:72;;47113:18;47070:28;:72::i;:::-;47043:24;:99;47174:18;;:43;;47197:19;47174:22;:43::i;:::-;47153:18;:64;-1:-1:-1;47237:25:0;;44801:2469;-1:-1:-1;;;;;;44801:2469:0:o;12100:196::-;12203:12;12235:53;12258:6;12266:4;12272:1;12275:12;12235:22;:53::i;:::-;12228:60;12100:196;-1:-1:-1;;;;12100:196:0:o;13477:979::-;13607:12;13640:18;13651:6;13640:10;:18::i;:::-;13632:60;;;;;-1:-1:-1;;;13632:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;13766:12;13780:23;13807:6;-1:-1:-1;;;;;13807:11:0;13827:8;13838:4;13807:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13765:78;;;;13858:7;13854:595;;;13889:10;-1:-1:-1;13882:17:0;;-1:-1:-1;13882:17:0;13854:595;14003:17;;:21;13999:439;;14266:10;14260:17;14327:15;14314:10;14310:2;14306:19;14299:44;14214:148;14402:20;;-1:-1:-1;;;14402:20:0;;;;;;;;;;;;;;;;;14409:12;;14402:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8985:619;9045:4;9513:20;;9356:66;9553:23;;;;;;:42;;-1:-1:-1;;9580:15:0;;;9545:51;-1:-1:-1;;8985:619:0:o

Swarm Source

ipfs://508113572eba8bf03da07272670238671331c96291acad5f41311f06be8c9265

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  ]
[ 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.