ETH Price: $3,258.55 (-2.63%)

Contract

0x2a300082AAfe41509e3465447c6a3Ac08556e5d7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw200532392024-06-09 9:01:35156 days ago1717923695IN
0x2a300082...08556e5d7
0 ETH0.000464565.04569245
Withdraw145900262022-04-15 12:47:07942 days ago1650026827IN
0x2a300082...08556e5d7
0 ETH0.0032733629.98682887
Withdraw144611212022-03-26 9:48:11962 days ago1648288091IN
0x2a300082...08556e5d7
0 ETH0.0025745623.58268573
Withdraw136901972021-11-26 14:09:131082 days ago1637935753IN
0x2a300082...08556e5d7
0 ETH0.01040413113
Withdraw135321842021-11-01 16:18:471107 days ago1635783527IN
0x2a300082...08556e5d7
0 ETH0.01304512174
Withdraw134158132021-10-14 10:34:481125 days ago1634207688IN
0x2a300082...08556e5d7
0 ETH0.0083321476.32962379
Withdraw133991932021-10-11 19:38:121128 days ago1633981092IN
0x2a300082...08556e5d7
0 ETH0.011244150
Withdraw132069852021-09-11 21:50:451158 days ago1631397045IN
0x2a300082...08556e5d7
0 ETH0.0045129449.02811632
Withdraw131828272021-09-08 4:06:311161 days ago1631073991IN
0x2a300082...08556e5d7
0 ETH0.01233643113
Withdraw131535862021-09-03 15:31:331166 days ago1630683093IN
0x2a300082...08556e5d7
0 ETH0.01688466183.38543309
Withdraw131309082021-08-31 3:27:471169 days ago1630380467IN
0x2a300082...08556e5d7
0 ETH0.00155460
Withdraw131309082021-08-31 3:27:471169 days ago1630380467IN
0x2a300082...08556e5d7
0 ETH0.004497660
Withdraw130657672021-08-21 1:38:151179 days ago1629509895IN
0x2a300082...08556e5d7
0 ETH0.009116880
Withdraw130511382021-08-18 19:37:381182 days ago1629315458IN
0x2a300082...08556e5d7
0 ETH0.0047467249
Withdraw129487372021-08-02 22:52:101198 days ago1627944730IN
0x2a300082...08556e5d7
0 ETH0.0020075631
Withdraw129347572021-07-31 17:50:271200 days ago1627753827IN
0x2a300082...08556e5d7
0 ETH0.005521757
Withdraw128854482021-07-23 23:08:011208 days ago1627081681IN
0x2a300082...08556e5d7
0 ETH0.0055671756.25
Withdraw128841842021-07-23 18:19:481208 days ago1627064388IN
0x2a300082...08556e5d7
0 ETH0.0017190621
Withdraw128305472021-07-15 8:42:001216 days ago1626338520IN
0x2a300082...08556e5d7
0 ETH0.0018827823
Withdraw128276082021-07-14 21:48:301217 days ago1626299310IN
0x2a300082...08556e5d7
0 ETH0.01009392102
Withdraw128250682021-07-14 12:11:291217 days ago1626264689IN
0x2a300082...08556e5d7
0 ETH0.003167132
Withdraw128054622021-07-11 10:23:591220 days ago1625999039IN
0x2a300082...08556e5d7
0 ETH0.0081872100
Withdraw127720242021-07-06 5:25:421225 days ago1625549142IN
0x2a300082...08556e5d7
0 ETH0.0023739429
Withdraw127646432021-07-05 1:53:421226 days ago1625450022IN
0x2a300082...08556e5d7
0 ETH0.0010641813
Withdraw127634472021-07-04 21:23:541227 days ago1625433834IN
0x2a300082...08556e5d7
0 ETH0.000494745
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

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

Contract Name:
FestakingFarm

Compiler Version
v0.6.2+commit.bacdbe57

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

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

// 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

// SPDX-License-Identifier: MIT

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

// SPDX-License-Identifier: MIT

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

// SPDX-License-Identifier: MIT

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: contracts/FestakingFarm.sol

pragma solidity ^0.6.0;



contract FestakingFarm {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    mapping (address => uint256) private _stakes;

    string public name;
    address  public tokenAddress;
    address  public rewardTokenAddress;
    uint public stakingStarts;
    uint public stakingEnds;
    uint public withdrawStarts;
    uint public withdrawEnds;
    uint256 public stakedTotal;
    uint256 public stakingCap;
    uint256 public totalReward;
    uint256 public earlyWithdrawReward;
    uint256 public rewardBalance;
    uint256 public stakedBalance;

    IERC20 public ERC20Interface;
    event Staked(address indexed token, address indexed staker_, uint256 requestedAmount_, uint256 stakedAmount_);
    event PaidOut(address indexed token, address indexed rewardToken, address indexed staker_, uint256 amount_, uint256 reward_);

    /**
     */
    constructor (string memory name_,
        address tokenAddress_,
        address rewardTokenAddress_,
        uint stakingStarts_,
        uint stakingEnds_,
        uint withdrawStarts_,
        uint withdrawEnds_,
        uint256 stakingCap_) public {
        name = name_;
        require(tokenAddress_ != address(0), "Festaking: 0 address");
        tokenAddress = tokenAddress_;

        require(rewardTokenAddress_ != address(0), "Festaking: 0 reward address");
        rewardTokenAddress = rewardTokenAddress_;

        require(stakingStarts_ > 0, "Festaking: zero staking start time");
        if (stakingStarts_ < now) {
            stakingStarts = now;
        } else {
            stakingStarts = stakingStarts_;
        }

        require(stakingEnds_ > stakingStarts, "Festaking: staking end must be after staking starts");
        stakingEnds = stakingEnds_;

        require(withdrawStarts_ >= stakingEnds, "Festaking: withdrawStarts must be after staking ends");
        withdrawStarts = withdrawStarts_;

        require(withdrawEnds_ > withdrawStarts, "Festaking: withdrawEnds must be after withdraw starts");
        withdrawEnds = withdrawEnds_;

        require(stakingCap_ > 0, "Festaking: stakingCap must be positive");
        stakingCap = stakingCap_;
    }

    function addReward(uint256 rewardAmount, uint256 withdrawableAmount)
    public
    _before(withdrawStarts)
    returns (bool) {
        require(rewardAmount > 0, "Festaking: reward must be positive");
        require(withdrawableAmount >= 0, "Festaking: withdrawable amount cannot be negative");
        require(withdrawableAmount <= rewardAmount, "Festaking: withdrawable amount must be less than or equal to the reward amount");
        address from = msg.sender;
        if (!_payMe(from, rewardAmount, rewardTokenAddress)) {
            return false;
        }

        totalReward = totalReward.add(rewardAmount);
        rewardBalance = totalReward;
        earlyWithdrawReward = earlyWithdrawReward.add(withdrawableAmount);
        return true;
    }

    function stakeOf(address account) public view returns (uint256) {
        return _stakes[account];
    }

    /**
    * Requirements:
    * - `amount` Amount to be staked
    */
    function stake(uint256 amount)
    public
    _positive(amount)
    _realAddress(msg.sender)
    returns (bool) {
        address from = msg.sender;
        return _stake(from, amount);
    }

    function withdraw(uint256 amount)
    public
    _after(withdrawStarts)
    _positive(amount)
    _realAddress(msg.sender)
    returns (bool) {
        address from = msg.sender;
        require(amount <= _stakes[from], "Festaking: not enough balance");
        if (now < withdrawEnds) {
            return _withdrawEarly(from, amount);
        } else {
            return _withdrawAfterClose(from, amount);
        }
    }

    function _withdrawEarly(address from, uint256 amount)
    private
    _realAddress(from)
    returns (bool) {
        // This is the formula to calculate reward:
        // r = (earlyWithdrawReward / stakedTotal) * (now - stakingEnds) / (withdrawEnds - stakingEnds)
        // w = (1+r) * a
        uint256 denom = (withdrawEnds.sub(stakingEnds)).mul(stakedTotal);
        uint256 reward = (
        ( (now.sub(stakingEnds)).mul(earlyWithdrawReward) ).mul(amount)
        ).div(denom);
        rewardBalance = rewardBalance.sub(reward);
        stakedBalance = stakedBalance.sub(amount);
        _stakes[from] = _stakes[from].sub(amount);
        bool principalPaid = _payDirect(from, amount, tokenAddress);
        bool rewardPaid = _payDirect(from, reward, rewardTokenAddress);
        require(principalPaid && rewardPaid, "Festaking: error paying");
        emit PaidOut(tokenAddress, rewardTokenAddress, from, amount, reward);
        return true;
    }

    function _withdrawAfterClose(address from, uint256 amount)
    private
    _realAddress(from)
    returns (bool) {
        uint256 reward = (rewardBalance.mul(amount)).div(stakedBalance);
        _stakes[from] = _stakes[from].sub(amount);
        bool principalPaid = _payDirect(from, amount, tokenAddress);
        bool rewardPaid = _payDirect(from, reward, rewardTokenAddress);
        require(principalPaid && rewardPaid, "Festaking: error paying");
        emit PaidOut(tokenAddress, rewardTokenAddress, from, amount, reward);
        return true;
    }

    function _stake(address staker, uint256 amount)
    private
    _after(stakingStarts)
    _before(stakingEnds)
    _positive(amount)
    returns (bool) {
        // check the remaining amount to be staked
        uint256 remaining = amount;
        if (remaining > (stakingCap.sub(stakedBalance))) {
            remaining = stakingCap.sub(stakedBalance);
        }
        // These requires are not necessary, because it will never happen, but won't hurt to double check
        // this is because stakedTotal and stakedBalance are only modified in this method during the staking period
        require(remaining > 0, "Festaking: Staking cap is filled");
        require((remaining + stakedTotal) <= stakingCap, "Festaking: this will increase staking amount pass the cap");
        if (!_payMe(staker, remaining, tokenAddress)) {
            return false;
        }
        emit Staked(tokenAddress, staker, amount, remaining);

        // Transfer is completed
        stakedBalance = stakedBalance.add(remaining);
        stakedTotal = stakedTotal.add(remaining);
        _stakes[staker] = _stakes[staker].add(remaining);
        return true;
    }

    function _payMe(address payer, uint256 amount, address token)
    private
    returns (bool) {
        return _payTo(payer, address(this), amount, token);
    }

    function _payTo(address allower, address receiver, uint256 amount, address token)
    private
    returns (bool) {
        // Request to transfer amount from the contract to receiver.
        // contract does not own the funds, so the allower must have added allowance to the contract
        // Allower is the original owner.
        ERC20Interface = IERC20(token);
        ERC20Interface.safeTransferFrom(allower, receiver, amount);
        return true;
    }

    function _payDirect(address to, uint256 amount, address token)
    private
    returns (bool) {
        if (amount == 0) {
            return true;
        }
        ERC20Interface = IERC20(token);
        ERC20Interface.safeTransfer(to, amount);
        return true;
    }

    modifier _realAddress(address addr) {
        require(addr != address(0), "Festaking: zero address");
        _;
    }

    modifier _positive(uint256 amount) {
        require(amount >= 0, "Festaking: negative amount");
        _;
    }

    modifier _after(uint eventTime) {
        require(now >= eventTime, "Festaking: bad timing for the request");
        _;
    }

    modifier _before(uint eventTime) {
        require(now < eventTime, "Festaking: bad timing for the request");
        _;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"address","name":"tokenAddress_","type":"address"},{"internalType":"address","name":"rewardTokenAddress_","type":"address"},{"internalType":"uint256","name":"stakingStarts_","type":"uint256"},{"internalType":"uint256","name":"stakingEnds_","type":"uint256"},{"internalType":"uint256","name":"withdrawStarts_","type":"uint256"},{"internalType":"uint256","name":"withdrawEnds_","type":"uint256"},{"internalType":"uint256","name":"stakingCap_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":true,"internalType":"address","name":"staker_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward_","type":"uint256"}],"name":"PaidOut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"staker_","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestedAmount_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakedAmount_","type":"uint256"}],"name":"Staked","type":"event"},{"inputs":[],"name":"ERC20Interface","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawableAmount","type":"uint256"}],"name":"addReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earlyWithdrawReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stakeOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingEnds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingStarts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEnds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawStarts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101165760003560e01c80636d68c7d4116100a2578063a694fc3a11610071578063a694fc3a14610288578063aa5c3ab4146102a5578063b410e2a1146102ad578063d66692a7146102b5578063eacebf61146102bd57610116565b80636d68c7d41461024d578063750142e61461025557806375c93bb91461025d5780639d76ea581461028057610116565b80632e1a7d4d116100e95780632e1a7d4d146101de5780633f7fd60a1461020f578063426233601461021757806344c370d31461023d5780635b9f00161461024557610116565b806306fdde031461011b578063125f9e33146101985780631bbc4b83146101bc57806321b13cdf146101c4575b600080fd5b6101236102c5565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a0610352565b604080516001600160a01b039092168252519081900360200190f35b6101a0610361565b6101cc610370565b60408051918252519081900360200190f35b6101fb600480360360208110156101f457600080fd5b5035610376565b604080519115158252519081900360200190f35b6101cc61049a565b6101cc6004803603602081101561022d57600080fd5b50356001600160a01b03166104a0565b6101cc6104bb565b6101cc6104c1565b6101cc6104c7565b6101cc6104cd565b6101fb6004803603604081101561027357600080fd5b50803590602001356104d3565b6101a06105fb565b6101fb6004803603602081101561029e57600080fd5b503561060a565b6101cc61066e565b6101cc610674565b6101cc61067a565b6101cc610680565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561034a5780601f1061031f5761010080835404028352916020019161034a565b820191906000526020600020905b81548152906001019060200180831161032d57829003601f168201915b505050505081565b6003546001600160a01b031681565b600e546001600160a01b031681565b60065481565b6000600654804210156103ba5760405162461bcd60e51b815260040180806020018281038252602581526020018061126a6025913960400191505060405180910390fd5b823380610408576040805162461bcd60e51b815260206004820152601760248201527646657374616b696e673a207a65726f206164647265737360481b604482015290519081900360640190fd5b3360008181526020819052604090205486111561046c576040805162461bcd60e51b815260206004820152601d60248201527f46657374616b696e673a206e6f7420656e6f7567682062616c616e6365000000604482015290519081900360640190fd5b600754421015610488576104808187610686565b945050610492565b6104808187610895565b505050919050565b600b5481565b6001600160a01b031660009081526020819052604090205490565b60095481565b600d5481565b60045481565b600a5481565b60006006548042106105165760405162461bcd60e51b815260040180806020018281038252602581526020018061126a6025913960400191505060405180910390fd5b600084116105555760405162461bcd60e51b81526004018080602001828103825260228152602001806112fe6022913960400191505060405180910390fd5b838311156105945760405162461bcd60e51b815260040180806020018281038252604e8152602001806112b0604e913960600191505060405180910390fd5b60035433906105af90829087906001600160a01b0316610a36565b6105bd5760009250506105f4565b600a546105d0908663ffffffff610a4e16565b600a819055600c55600b546105eb908563ffffffff610a4e16565b600b5550600191505b5092915050565b6002546001600160a01b031681565b600081338061065a576040805162461bcd60e51b815260206004820152601760248201527646657374616b696e673a207a65726f206164647265737360481b604482015290519081900360640190fd5b336106658186610ab1565b95945050505050565b600c5481565b60055481565b60085481565b60075481565b6000826001600160a01b0381166106de576040805162461bcd60e51b815260206004820152601760248201527646657374616b696e673a207a65726f206164647265737360481b604482015290519081900360640190fd5b60006107096008546106fd600554600754610cf590919063ffffffff16565b9063ffffffff610d3716565b9050600061073c82610730876106fd600b546106fd60055442610cf590919063ffffffff16565b9063ffffffff610d9016565b600c54909150610752908263ffffffff610cf516565b600c55600d54610768908663ffffffff610cf516565b600d556001600160a01b038616600090815260208190526040902054610794908663ffffffff610cf516565b6001600160a01b038088166000908152602081905260408120929092556002546107c2918991899116610dd2565b6003549091506000906107e190899085906001600160a01b0316610dd2565b90508180156107ed5750805b610838576040805162461bcd60e51b815260206004820152601760248201527646657374616b696e673a206572726f7220706179696e6760481b604482015290519081900360640190fd5b600354600254604080518a81526020810187905281516001600160a01b03808e169581169416927f0fd12da3890315fa38b862dc2fff7f24c95981f6508cc2be090640de791b671e928290030190a4506001979650505050505050565b6000826001600160a01b0381166108ed576040805162461bcd60e51b815260206004820152601760248201527646657374616b696e673a207a65726f206164647265737360481b604482015290519081900360640190fd5b600061090a600d5461073086600c54610d3790919063ffffffff16565b6001600160a01b038616600090815260208190526040902054909150610936908563ffffffff610cf516565b6001600160a01b03808716600090815260208190526040812092909255600254610964918891889116610dd2565b60035490915060009061098390889085906001600160a01b0316610dd2565b905081801561098f5750805b6109da576040805162461bcd60e51b815260206004820152601760248201527646657374616b696e673a206572726f7220706179696e6760481b604482015290519081900360640190fd5b600354600254604080518981526020810187905281516001600160a01b03808d169581169416927f0fd12da3890315fa38b862dc2fff7f24c95981f6508cc2be090640de791b671e928290030190a45060019695505050505050565b6000610a4484308585610e18565b90505b9392505050565b600082820183811015610aa8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600060045480421015610af55760405162461bcd60e51b815260040180806020018281038252602581526020018061126a6025913960400191505060405180910390fd5b600554804210610b365760405162461bcd60e51b815260040180806020018281038252602581526020018061126a6025913960400191505060405180910390fd5b83600d546009548691610b4f919063ffffffff610cf516565b811115610b6e57600d54600954610b6b9163ffffffff610cf516565b90505b60008111610bc3576040805162461bcd60e51b815260206004820181905260248201527f46657374616b696e673a205374616b696e67206361702069732066696c6c6564604482015290519081900360640190fd5b60095460085482011115610c085760405162461bcd60e51b815260040180806020018281038252603981526020018061134a6039913960400191505060405180910390fd5b600254610c2190889083906001600160a01b0316610a36565b610c2f576000945050610cec565b600254604080518881526020810184905281516001600160a01b03808c169416927f6c86f3fd5118b3aa8bb4f389a617046de0a3d3d477de1a1673d227f802f616dc928290030190a3600d54610c8b908263ffffffff610a4e16565b600d55600854610ca1908263ffffffff610a4e16565b6008556001600160a01b038716600090815260208190526040902054610ccd908263ffffffff610a4e16565b6001600160a01b03881660009081526020819052604090205550600193505b50505092915050565b6000610aa883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e55565b600082610d4657506000610aab565b82820282848281610d5357fe5b0414610aa85760405162461bcd60e51b815260040180806020018281038252602181526020018061128f6021913960400191505060405180910390fd5b6000610aa883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610eec565b600082610de157506001610a47565b600e80546001600160a01b0319166001600160a01b038481169190911791829055610e0e91168585610f51565b5060019392505050565b600e80546001600160a01b0319166001600160a01b038381169190911791829055600091610e499116868686610fa8565b5060015b949350505050565b60008184841115610ee45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ea9578181015183820152602001610e91565b50505050905090810190601f168015610ed65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610f3b5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610ea9578181015183820152602001610e91565b506000838581610f4757fe5b0495945050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610fa3908490611008565b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611002908590611008565b50505050565b606061105d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110b99092919063ffffffff16565b805190915015610fa35780806020019051602081101561107c57600080fd5b5051610fa35760405162461bcd60e51b815260040180806020018281038252602a815260200180611320602a913960400191505060405180910390fd5b6060610a44848460008560606110ce85611230565b61111f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061115e5780518252601f19909201916020918201910161113f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146111c0576040519150601f19603f3d011682016040523d82523d6000602084013e6111c5565b606091505b509150915081156111d9579150610e4d9050565b8051156111e95780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610ea9578181015183820152602001610e91565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610e4d57505015159291505056fe46657374616b696e673a206261642074696d696e6720666f72207468652072657175657374536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7746657374616b696e673a20776974686472617761626c6520616d6f756e74206d757374206265206c657373207468616e206f7220657175616c20746f207468652072657761726420616d6f756e7446657374616b696e673a20726577617264206d75737420626520706f7369746976655361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656446657374616b696e673a20746869732077696c6c20696e637265617365207374616b696e6720616d6f756e7420706173732074686520636170a2646970667358221220a1f22bb88c1428d096c4303a196bcab87897f06d84e2c6c0e6d8e9846f9e75c264736f6c63430006020033

Deployed Bytecode Sourcemap

18358:8041:0:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;18358:8041:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18509:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;18509:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18569:34;;;:::i;:::-;;;;-1:-1:-1;;;;;18569:34:0;;;;;;;;;;;;;;18947:28;;;:::i;18672:26::-;;;:::i;:::-;;;;;;;;;;;;;;;;21750:436;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21750:436:0;;:::i;:::-;;;;;;;;;;;;;;;;;;18834:34;;;:::i;21354:106::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21354:106:0;-1:-1:-1;;;;;21354:106:0;;:::i;18769:25::-;;;:::i;18910:28::-;;;:::i;18610:25::-;;;:::i;18801:26::-;;;:::i;20572:774::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20572:774:0;;;;;;;:::i;18534:28::-;;;:::i;21544:198::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21544:198:0;;:::i;18875:28::-;;;:::i;18642:23::-;;;:::i;18736:26::-;;;:::i;18705:24::-;;;:::i;18509:18::-;;;;;;;;;;;;;;;-1:-1:-1;;18509:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;18569:34::-;;;-1:-1:-1;;;;;18569:34:0;;:::o;18947:28::-;;;-1:-1:-1;;;;;18947:28:0;;:::o;18672:26::-;;;;:::o;21750:436::-;21891:4;21808:14;;26188:9;26181:3;:16;;26173:66;;;;-1:-1:-1;;;26173:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21839:6;21865:10:::2;25932:18:::0;25924:54:::2;;;::::0;;-1:-1:-1;;;25924:54:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;25924:54:0;;;;;;;;;;;;;::::2;;21923:10:::3;21908:12;21962:13:::0;;;::::3;::::0;;;;;;;21952:23;::::3;;21944:65;;;::::0;;-1:-1:-1;;;21944:65:0;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;::::3;::::0;;;;;;;;;;;;;::::3;;22030:12;;22024:3;:18;22020:159;;;22066:28;22081:4;22087:6;22066:14;:28::i;:::-;22059:35;;;;;22020:159;22134:33;22154:4;22160:6;22134:19;:33::i;25989:1::-;26113::::2;26250::::1;21750:436:::0;;;;:::o;18834:34::-;;;;:::o;21354:106::-;-1:-1:-1;;;;;21436:16:0;21409:7;21436:16;;;;;;;;;;;;21354:106::o;18769:25::-;;;;:::o;18910:28::-;;;;:::o;18610:25::-;;;;:::o;18801:26::-;;;;:::o;20572:774::-;20696:4;20666:14;;26325:9;26319:3;:15;26311:65;;;;-1:-1:-1;;;26311:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20736:1:::1;20721:12;:16;20713:63;;;;-1:-1:-1::0;;;20713:63:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20913:12;20891:18;:34;;20883:125;;;;-1:-1:-1::0;;;20883:125:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21087:18;::::0;21034:10:::1;::::0;21060:46:::1;::::0;21034:10;;21073:12;;-1:-1:-1;;;;;21087:18:0::1;21060:6;:46::i;:::-;21055:92;;21130:5;21123:12;;;;;21055:92;21173:11;::::0;:29:::1;::::0;21189:12;21173:29:::1;:15;:29;:::i;:::-;21159:11;:43:::0;;;21213:13:::1;:27:::0;21273:19:::1;::::0;:43:::1;::::0;21297:18;21273:43:::1;:23;:43;:::i;:::-;21251:19;:65:::0;-1:-1:-1;21334:4:0::1;::::0;-1:-1:-1;26387:1:0::1;20572:774:::0;;;;;:::o;18534:28::-;;;-1:-1:-1;;;;;18534:28:0;;:::o;21544:198::-;21654:4;21602:6;21628:10:::1;25932:18:::0;25924:54:::1;;;::::0;;-1:-1:-1;;;25924:54:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;25924:54:0;;;;;;;;;;;;;::::1;;21686:10:::2;21714:20;21686:10:::0;21727:6;21714::::2;:20::i;:::-;21707:27:::0;21544:198;-1:-1:-1;;;;;21544:198:0:o;18875:28::-;;;;:::o;18642:23::-;;;;:::o;18736:26::-;;;;:::o;18705:24::-;;;;:::o;22194:976::-;22299:4;22279;-1:-1:-1;;;;;25932:18:0;;25924:54;;;;;-1:-1:-1;;;25924:54:0;;;;;;;;;;;;-1:-1:-1;;;25924:54:0;;;;;;;;;;;;;;;22500:13:::1;22516:48;22552:11;;22517:29;22534:11;;22517:12;;:16;;:29;;;;:::i;:::-;22516:35:::0;:48:::1;:35;:48;:::i;:::-;22500:64;;22575:14;22592:96;22682:5;22603:63;22659:6;22605:47;22632:19;;22606:20;22614:11;;22606:3;:7;;:20;;;;:::i;22603:63::-;22592:89:::0;:96:::1;:89;:96;:::i;:::-;22715:13;::::0;22575:113;;-1:-1:-1;22715:25:0::1;::::0;22575:113;22715:25:::1;:17;:25;:::i;:::-;22699:13;:41:::0;22767:13:::1;::::0;:25:::1;::::0;22785:6;22767:25:::1;:17;:25;:::i;:::-;22751:13;:41:::0;-1:-1:-1;;;;;22819:13:0;::::1;:7;:13:::0;;;::::1;::::0;;;;;;;:25:::1;::::0;22837:6;22819:25:::1;:17;:25;:::i;:::-;-1:-1:-1::0;;;;;22803:13:0;;::::1;:7;:13:::0;;;::::1;::::0;;;;;;:41;;;;22901:12:::1;::::0;22876:38:::1;::::0;22811:4;;22893:6;;22901:12:::1;22876:10;:38::i;:::-;22968:18;::::0;22855:59;;-1:-1:-1;22925:15:0::1;::::0;22943:44:::1;::::0;22954:4;;22960:6;;-1:-1:-1;;;;;22968:18:0::1;22943:10;:44::i;:::-;22925:62;;23006:13;:27;;;;;23023:10;23006:27;22998:63;;;::::0;;-1:-1:-1;;;22998:63:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;22998:63:0;;;;;;;;;;;;;::::1;;23099:18;::::0;23085:12:::1;::::0;23077:63:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;;;;;23077:63:0;;::::1;::::0;23099:18;::::1;::::0;23085:12:::1;::::0;23077:63:::1;::::0;;;;;;::::1;-1:-1:-1::0;23158:4:0::1;::::0;22194:976;-1:-1:-1;;;;;;;22194:976:0:o;23178:568::-;23288:4;23268;-1:-1:-1;;;;;25932:18:0;;25924:54;;;;;-1:-1:-1;;;25924:54:0;;;;;;;;;;;;-1:-1:-1;;;25924:54:0;;;;;;;;;;;;;;;23305:14:::1;23322:46;23354:13;;23323:25;23341:6;23323:13;;:17;;:25;;;;:::i;23322:46::-;-1:-1:-1::0;;;;;23395:13:0;::::1;:7;:13:::0;;;::::1;::::0;;;;;;;23305:63;;-1:-1:-1;23395:25:0::1;::::0;23413:6;23395:25:::1;:17;:25;:::i;:::-;-1:-1:-1::0;;;;;23379:13:0;;::::1;:7;:13:::0;;;::::1;::::0;;;;;;:41;;;;23477:12:::1;::::0;23452:38:::1;::::0;23387:4;;23469:6;;23477:12:::1;23452:10;:38::i;:::-;23544:18;::::0;23431:59;;-1:-1:-1;23501:15:0::1;::::0;23519:44:::1;::::0;23530:4;;23536:6;;-1:-1:-1;;;;;23544:18:0::1;23519:10;:44::i;:::-;23501:62;;23582:13;:27;;;;;23599:10;23582:27;23574:63;;;::::0;;-1:-1:-1;;;23574:63:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;23574:63:0;;;;;;;;;;;;;::::1;;23675:18;::::0;23661:12:::1;::::0;23653:63:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;;;;;23653:63:0;;::::1;::::0;23675:18;::::1;::::0;23661:12:::1;::::0;23653:63:::1;::::0;;;;;;::::1;-1:-1:-1::0;23734:4:0::1;::::0;23178:568;-1:-1:-1;;;;;;23178:568:0:o;24937:164::-;25026:4;25050:43;25057:5;25072:4;25079:6;25087:5;25050:6;:43::i;:::-;25043:50;;24937:164;;;;;;:::o;956:181::-;1014:7;1046:5;;;1070:6;;;;1062:46;;;;;-1:-1:-1;;;1062:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;1128:1;-1:-1:-1;956:181:0;;;;;:::o;23754:1175::-;23905:4;23827:13;;26188:9;26181:3;:16;;26173:66;;;;-1:-1:-1;;;26173:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23855:11:::1;;26325:9;26319:3;:15;26311:65;;;;-1:-1:-1::0;;;26311:65:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23883:6:::0;24043:13:::3;::::0;24028:10:::3;::::0;23994:6;;24028:29:::3;::::0;:10;:29:::3;:14;:29;:::i;:::-;24015:9;:43;24011:117;;;24102:13;::::0;24087:10:::3;::::0;:29:::3;::::0;::::3;:14;:29;:::i;:::-;24075:41;;24011:117;24382:1;24370:9;:13;24362:58;;;::::0;;-1:-1:-1;;;24362:58:0;;::::3;;::::0;::::3;::::0;;;;;;;::::3;::::0;;;;;;;;;;;;;::::3;;24468:10;;24452:11;;24440:9;:23;24439:39;;24431:109;;;;-1:-1:-1::0;;;24431:109:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24582:12;::::0;24556:39:::3;::::0;24563:6;;24571:9;;-1:-1:-1;;;;;24582:12:0::3;24556:6;:39::i;:::-;24551:85;;24619:5;24612:12;;;;;24551:85;24658:12;::::0;24651:47:::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;-1:-1:-1;;;;;24651:47:0;;::::3;::::0;24658:12:::3;::::0;24651:47:::3;::::0;;;;;;::::3;24761:13;::::0;:28:::3;::::0;24779:9;24761:28:::3;:17;:28;:::i;:::-;24745:13;:44:::0;24814:11:::3;::::0;:26:::3;::::0;24830:9;24814:26:::3;:15;:26;:::i;:::-;24800:11;:40:::0;-1:-1:-1;;;;;24869:15:0;::::3;:7;:15:::0;;;::::3;::::0;;;;;;;:30:::3;::::0;24889:9;24869:30:::3;:19;:30;:::i;:::-;-1:-1:-1::0;;;;;24851:15:0;::::3;:7;:15:::0;;;::::3;::::0;;;;;;:48;-1:-1:-1;24917:4:0::3;::::0;-1:-1:-1;26113:1:0::3;26387::::2;26250::::1;23754:1175:::0;;;;;:::o;1420:136::-;1478:7;1505:43;1509:1;1512;1505:43;;;;;;;;;;;;;;;;;:3;:43::i;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;25587:282::-;25677:4;25698:11;25694:55;;-1:-1:-1;25733:4:0;25726:11;;25694:55;25759:14;:30;;-1:-1:-1;;;;;;25759:30:0;-1:-1:-1;;;;;25759:30:0;;;;;;;;;;;25800:39;;:14;25828:2;25832:6;25800:27;:39::i;:::-;-1:-1:-1;25857:4:0;25587:282;;;;;:::o;25109:470::-;25450:14;:30;;-1:-1:-1;;;;;;25450:30:0;-1:-1:-1;;;;;25450:30:0;;;;;;;;;;;-1:-1:-1;;25491:58:0;;:14;25523:7;25532:8;25542:6;25491:31;:58::i;:::-;-1:-1:-1;25567:4:0;25109:470;;;;;;;:::o;1859:192::-;1945:7;1981:12;1973:6;;;;1965:29;;;;-1:-1:-1;;;1965:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1965:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2017:5:0;;;1859:192::o;3885:278::-;3971:7;4006:12;3999:5;3991:28;;;;-1:-1:-1;;;3991:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3991:28:0;;4030:9;4046:1;4042;:5;;;;;;;3885:278;-1:-1:-1;;;;;3885:278:0:o;15214:177::-;15324:58;;;-1:-1:-1;;;;;15324:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;15324:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;15297:86:0;;15317:5;;15297:19;:86::i;:::-;15214:177;;;:::o;15399:205::-;15527:68;;;-1:-1:-1;;;;;15527:68:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;15527:68:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;15500:96:0;;15520:5;;15500:19;:96::i;:::-;15399:205;;;;:::o;17519:761::-;17943:23;17969:69;17997:4;17969:69;;;;;;;;;;;;;;;;;17977:5;-1:-1:-1;;;;;17969:27:0;;;:69;;;;;:::i;:::-;18053:17;;17943:95;;-1:-1:-1;18053:21:0;18049:224;;18195:10;18184:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;18184:30:0;18176:85;;;;-1:-1:-1;;;18176:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12162:196;12265:12;12297:53;12320:6;12328:4;12334:1;12337:12;13669;13702:18;13713:6;13702:10;:18::i;:::-;13694:60;;;;;-1:-1:-1;;;13694:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;13828:12;13842:23;13869:6;-1:-1:-1;;;;;13869:11:0;13889:8;13900:4;13869:36;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;13869:36:0;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;;13827:78:0;;;;13920:7;13916:595;;;13951:10;-1:-1:-1;13944:17:0;;-1:-1:-1;13944:17:0;13916:595;14065:17;;:21;14061:439;;14328:10;14322:17;14389:15;14376:10;14372:2;14368:19;14361:44;14276:148;14464:20;;-1:-1:-1;;;14464:20:0;;;;;;;;;;;;;;;;;14471:12;;14464:20;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;9047:619:0;9107:4;9575:20;;9418:66;9615:23;;;;;;:42;;-1:-1:-1;;9642:15:0;;;9607:51;-1:-1:-1;;9047:619:0:o

Swarm Source

ipfs://a1f22bb88c1428d096c4303a196bcab87897f06d84e2c6c0e6d8e9846f9e75c2

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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