ETH Price: $3,417.48 (-7.40%)

Contract

0x80f1502Bac484332201bE5B316F8c17cEE296DB1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stake Tokens167112062023-02-26 8:25:11662 days ago1677399911IN
0x80f1502B...cEE296DB1
0 ETH0.0035203317.25415192
Stake Tokens167111972023-02-26 8:23:23662 days ago1677399803IN
0x80f1502B...cEE296DB1
0 ETH0.0039459718.31715905
Stake Tokens167111862023-02-26 8:21:11662 days ago1677399671IN
0x80f1502B...cEE296DB1
0 ETH0.0059508520.05438422
Set Price Feed C...167111592023-02-26 8:15:47662 days ago1677399347IN
0x80f1502B...cEE296DB1
0 ETH0.0010066821.58097927
Add Allowed Toke...167111552023-02-26 8:14:47662 days ago1677399287IN
0x80f1502B...cEE296DB1
0 ETH0.000953918.64220406
Set Price Feed C...167111462023-02-26 8:12:35662 days ago1677399155IN
0x80f1502B...cEE296DB1
0 ETH0.0008534718.29636427
Add Allowed Toke...167111392023-02-26 8:11:11662 days ago1677399071IN
0x80f1502B...cEE296DB1
0 ETH0.0008863217.32148972
Set Price Feed C...167109002023-02-26 7:23:23662 days ago1677396203IN
0x80f1502B...cEE296DB1
0 ETH0.000730615.66236023
Add Allowed Toke...167108992023-02-26 7:23:11662 days ago1677396191IN
0x80f1502B...cEE296DB1
0 ETH0.0007981215.59791907
Set Price Feed C...167108942023-02-26 7:22:11662 days ago1677396131IN
0x80f1502B...cEE296DB1
0 ETH0.0007358215.77430025
Add Allowed Toke...167108892023-02-26 7:21:11662 days ago1677396071IN
0x80f1502B...cEE296DB1
0 ETH0.0010746515.74146434

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenFarm

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 8 : TokenFarm.sol
// SPDX-License-Identifier: MIT

import "Ownable.sol";
import "IERC20.sol";
import "SafeERC20.sol";
import "AggregatorV3Interface.sol";
import "ReentrancyGuard.sol";

pragma solidity ^0.8.0;

contract TokenFarm is Ownable, ReentrancyGuard {
    mapping(address => mapping(address => uint256)) public stakingBalance;
    mapping(address => uint256) public uniqueTokensStaked;
    mapping(address => address) public tokenPriceFeedMapping;
    address[] public stakers;
    address[] public allowedTokens;
    using SafeERC20 for IERC20;
    IERC20 public timeToken;
    uint256 public totalRaised;
    uint256 public goal;
    enum FUND_STATE {
        OPEN,
        REFUND,
        CLOSED
    }
    FUND_STATE public fund_state;

    constructor(address _timeTokenAddress) public {
        timeToken = IERC20(_timeTokenAddress);
        fund_state = FUND_STATE.OPEN;
        goal = 75000000000000000000000;
    }

    function stateOpen() public onlyOwner {
        fund_state = FUND_STATE.OPEN;
    }

    function stateRefund() public onlyOwner {
        fund_state = FUND_STATE.REFUND;
    }

    function stateClosed() public onlyOwner {
        fund_state = FUND_STATE.CLOSED;
    }

    function setPriceFeedContract(address _token, address _priceFeed)
        public
        onlyOwner
    {
        tokenPriceFeedMapping[_token] = _priceFeed;
    }

    function goalAmount() public onlyOwner returns (uint256) {
        return goal;
    }

    function totalERCRaised() public onlyOwner returns (uint256) {
        return totalRaised;
    }

    function getTokenValue(address _token)
        public
        view
        returns (uint256, uint256)
    {
        address priceFeedAddress = tokenPriceFeedMapping[_token];
        AggregatorV3Interface priceFeed = AggregatorV3Interface(
            priceFeedAddress
        );
        (, int256 price, , , ) = priceFeed.latestRoundData();
        uint256 decimals = uint256(priceFeed.decimals());
        return (uint256(price), decimals);
    }

    function stakeTokens(uint256 _amount, address _token) public nonReentrant {
        require(fund_state == FUND_STATE.OPEN);
        require(_amount > 0, "Amount must be more than zero!");
        require(tokenIsAllowed(_token), "Token is currently not allowed!");
        (uint256 price, uint256 decimals) = getTokenValue(_token);
        require(
            totalRaised + ((_amount * price) / ((10**decimals))) < goal,
            "Too much money"
        );
        uint256 _amount2 = ((_amount * (10**20)) / (10**decimals));
        IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);
        updateUniqueTokensStaked(msg.sender, _token);
        if (getUserTotalValue(msg.sender) <= 0) {
            stakers.push(msg.sender);
        }
        if (
            address(_token) ==
            address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)
        ) {
            stakingBalance[_token][msg.sender] =
                stakingBalance[_token][msg.sender] +
                _amount2;
            totalRaised = uint256(
                totalRaised + (((_amount2 * price)) / ((10**decimals)))
            );
        }
        if (
            address(_token) ==
            address(0xdAC17F958D2ee523a2206206994597C13D831ec7)
        ) {
            stakingBalance[_token][msg.sender] =
                stakingBalance[_token][msg.sender] +
                _amount2;
            totalRaised = uint256(
                totalRaised + (((_amount2 * price)) / ((10**decimals)))
            );
        }
        if (
            address(_token) ==
            address(0x6B175474E89094C44Da98b954EedeAC495271d0F)
        ) {
            stakingBalance[_token][msg.sender] =
                stakingBalance[_token][msg.sender] +
                _amount;
            totalRaised = uint256(
                totalRaised + (((_amount * price)) / ((10**decimals)))
            );
        }
        if (
            address(_token) ==
            address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)
        ) {
            stakingBalance[_token][msg.sender] =
                stakingBalance[_token][msg.sender] +
                _amount;
            totalRaised = uint256(
                totalRaised + (((_amount * price)) / ((10**decimals)))
            );
        }
    }

    function issueTokens() public onlyOwner nonReentrant {
        require(fund_state == FUND_STATE.OPEN);
        for (
            uint256 stakersIndex = 0;
            stakersIndex < stakers.length;
            stakersIndex++
        ) {
            address recipient = stakers[stakersIndex];
            uint256 userTotalValue = getUserTotalValue(recipient);
            timeToken.transfer(recipient, userTotalValue);
        }
    }

    function claimRefund(address _token) public nonReentrant {
        require(fund_state == FUND_STATE.REFUND);
        uint256 balance = stakingBalance[_token][msg.sender];
        require(balance > 0, "Staking balance cannot be zero!");
        IERC20(_token).safeTransfer(msg.sender, balance);
        stakingBalance[_token][msg.sender] = 0;
        uniqueTokensStaked[msg.sender] = uniqueTokensStaked[msg.sender] - 1;
    }

    function getUserTotalValue(address _user) public view returns (uint256) {
        uint256 totalValue = 0;
        require(uniqueTokensStaked[_user] > 0, "No tokens staked!");
        for (
            uint256 allowedTokensIndex = 0;
            allowedTokensIndex < allowedTokens.length;
            allowedTokensIndex++
        ) {
            totalValue =
                totalValue +
                getUserSingleTokenValue(
                    _user,
                    allowedTokens[allowedTokensIndex]
                );
        }
        return totalValue;
    }

    function getUserSingleTokenValue(address _user, address _token)
        public
        view
        returns (uint256)
    {
        if (uniqueTokensStaked[_user] <= 0) {
            return 0;
        }
        (uint256 price, uint256 decimals) = getTokenValue(_token);
        return ((stakingBalance[_token][_user] * price) / (10**decimals));
    }

    function withdrawToken(address _token, uint256 _amount)
        external
        onlyOwner
        nonReentrant
    {
        IERC20 token = IERC20(_token);
        token.safeTransfer(msg.sender, _amount);
    }

    function updateUniqueTokensStaked(address _user, address _token) internal {
        if (stakingBalance[_token][_user] <= 0) {
            uniqueTokensStaked[_user] = uniqueTokensStaked[_user] + 1;
        }
    }

    function addAllowedTokens(address _token) public onlyOwner {
        allowedTokens.push(_token);
    }

    function tokenIsAllowed(address _token) public view returns (bool) {
        for (
            uint256 allowedTokensIndex = 0;
            allowedTokensIndex < allowedTokens.length;
            allowedTokensIndex++
        ) {
            if (allowedTokens[allowedTokensIndex] == _token) {
                return true;
            }
        }
        return false;
    }
}

File 2 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "Context.sol";

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

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

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

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 8 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 4 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.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 5 of 8 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IERC20.sol";
import "Address.sol";

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

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

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

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

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

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

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

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

File 6 of 8 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 8 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {

  function decimals()
    external
    view
    returns (
      uint8
    );

  function description()
    external
    view
    returns (
      string memory
    );

  function version()
    external
    view
    returns (
      uint256
    );

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(
    uint80 _roundId
  )
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

}

File 8 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and 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;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "libraries": {
    "TokenFarm.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_timeTokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"addAllowedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"claimRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fund_state","outputs":[{"internalType":"enum TokenFarm.FUND_STATE","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getTokenValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"getUserSingleTokenValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserTotalValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"goal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"goalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"issueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_priceFeed","type":"address"}],"name":"setPriceFeedContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"stakeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"stakingBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stateClosed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stateOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stateRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"tokenIsAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenPriceFeedMapping","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalERCRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalRaised","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":"address","name":"","type":"address"}],"name":"uniqueTokensStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051611a5c380380611a5c83398101604081905261002f916100c9565b61003833610079565b60018055600780546001600160a01b0319166001600160a01b0392909216919091179055600a805460ff19169055690fe1c215e8f838e000006009556100f9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100db57600080fd5b81516001600160a01b03811681146100f257600080fd5b9392505050565b611954806101086000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063c5c4744c11610097578063e27af3b911610071578063e27af3b91461037f578063f1c5d6c214610392578063f2fde38b146103ba578063fd5e6dd1146103cd57600080fd5b8063c5c4744c1461034b578063d08c9dbd14610354578063dd5b84671461035c57600080fd5b80639e281a98116100d35780639e281a98146102f2578063af3f5e2214610305578063b83e023414610318578063bffa55d51461033857600080fd5b8063715018a6146102c6578063877dd39d146102ce5780638da5cb5b146102e157600080fd5b806327927b3e1161016657806357e11a011161014057806357e11a01146102895780635e5f2e26146102a35780636043903d146102b657806360ab5852146102be57600080fd5b806327927b3e1461021457806329161a0014610255578063401938831461028057600080fd5b806304bedc04146101ae5780630bea440d146101b857806315637548146101cb578063171e44ea146101d35780632636b945146101e6578063276b11da14610201575b600080fd5b6101b66103e0565b005b6101b66101c63660046114f1565b61042a565b6101b66108e0565b6101b66101e136600461151d565b61091d565b6101ee610999565b6040519081526020015b60405180910390f35b6101ee61020f366004611538565b6109cb565b61023d61022236600461151d565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f8565b6101ee610263366004611538565b600260209081526000928352604080842090915290825290205481565b6101ee60095481565b600a546102969060ff1681565b6040516101f89190611578565b61023d6102b13660046115a0565b610a52565b6101b6610a7c565b6101b6610aba565b6101b6610c05565b6101b66102dc366004611538565b610c3b565b6000546001600160a01b031661023d565b6101b66103003660046115b9565b610c93565b6101ee61031336600461151d565b610d02565b6101ee61032636600461151d565b60036020526000908152604090205481565b6101b661034636600461151d565b610dc0565b6101ee60085481565b6101ee610ee1565b61036f61036a36600461151d565b610f13565b60405190151581526020016101f8565b60075461023d906001600160a01b031681565b6103a56103a036600461151d565b610f7c565b604080519283526020830191909152016101f8565b6101b66103c836600461151d565b61107c565b61023d6103db3660046115a0565b611117565b6000546001600160a01b031633146104135760405162461bcd60e51b815260040161040a906115e3565b60405180910390fd5b600a80546002919060ff19166001835b0217905550565b60026001540361044c5760405162461bcd60e51b815260040161040a90611618565b60026001556000600a5460ff16600281111561046a5761046a611562565b1461047457600080fd5b600082116104c45760405162461bcd60e51b815260206004820152601e60248201527f416d6f756e74206d757374206265206d6f7265207468616e207a65726f210000604482015260640161040a565b6104cd81610f13565b6105195760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e2069732063757272656e746c79206e6f7420616c6c6f7765642100604482015260640161040a565b60008061052583610f7c565b600954919350915061053882600a611749565b6105428487611755565b61054c9190611774565b6008546105599190611796565b106105975760405162461bcd60e51b815260206004820152600e60248201526d546f6f206d756368206d6f6e657960901b604482015260640161040a565b60006105a482600a611749565b6105b78668056bc75e2d63100000611755565b6105c19190611774565b90506105d86001600160a01b038516333088611127565b6105e23385611198565b60006105ed33610d02565b1161063557600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b031916331790555b73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb47196001600160a01b038516016106dd576001600160a01b0384166000908152600260209081526040808320338452909152902054610689908290611796565b6001600160a01b03851660009081526002602090815260408083203384529091529020556106b882600a611749565b6106c28483611755565b6106cc9190611774565b6008546106d99190611796565b6008555b73dac17f958d2ee523a2206206994597c13d831ec6196001600160a01b03851601610785576001600160a01b0384166000908152600260209081526040808320338452909152902054610731908290611796565b6001600160a01b038516600090815260026020908152604080832033845290915290205561076082600a611749565b61076a8483611755565b6107749190611774565b6008546107819190611796565b6008555b736b175474e89094c44da98b954eedeac495271d0e196001600160a01b0385160161082d576001600160a01b03841660009081526002602090815260408083203384529091529020546107d9908690611796565b6001600160a01b038516600090815260026020908152604080832033845290915290205561080882600a611749565b6108128487611755565b61081c9190611774565b6008546108299190611796565b6008555b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc1196001600160a01b038516016108d5576001600160a01b0384166000908152600260209081526040808320338452909152902054610881908690611796565b6001600160a01b03851660009081526002602090815260408083203384529091529020556108b082600a611749565b6108ba8487611755565b6108c49190611774565b6008546108d19190611796565b6008555b505060018055505050565b6000546001600160a01b0316331461090a5760405162461bcd60e51b815260040161040a906115e3565b600a80546001919060ff19168280610423565b6000546001600160a01b031633146109475760405162461bcd60e51b815260040161040a906115e3565b600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b031633146109c45760405162461bcd60e51b815260040161040a906115e3565b5060095490565b6001600160a01b0382166000908152600360205260408120546109f057506000610a4c565b6000806109fc84610f7c565b9092509050610a0c81600a611749565b6001600160a01b038086166000908152600260209081526040808320938a1683529290522054610a3d908490611755565b610a479190611774565b925050505b92915050565b60068181548110610a6257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610aa65760405162461bcd60e51b815260040161040a906115e3565b600a80546000919060ff1916600183610423565b6000546001600160a01b03163314610ae45760405162461bcd60e51b815260040161040a906115e3565b600260015403610b065760405162461bcd60e51b815260040161040a90611618565b60026001556000600a5460ff166002811115610b2457610b24611562565b14610b2e57600080fd5b60005b600554811015610bfe57600060058281548110610b5057610b506117ae565b60009182526020822001546001600160a01b03169150610b6f82610d02565b60075460405163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905292935091169063a9059cbb906044016020604051808303816000875af1158015610bc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be891906117c4565b5050508080610bf6906117e6565b915050610b31565b5060018055565b6000546001600160a01b03163314610c2f5760405162461bcd60e51b815260040161040a906115e3565b610c396000611204565b565b6000546001600160a01b03163314610c655760405162461bcd60e51b815260040161040a906115e3565b6001600160a01b03918216600090815260046020526040902080546001600160a01b03191691909216179055565b6000546001600160a01b03163314610cbd5760405162461bcd60e51b815260040161040a906115e3565b600260015403610cdf5760405162461bcd60e51b815260040161040a90611618565b600260015581610cf96001600160a01b0382163384611254565b50506001805550565b6001600160a01b0381166000908152600360205260408120548190610d5d5760405162461bcd60e51b81526020600482015260116024820152704e6f20746f6b656e73207374616b65642160781b604482015260640161040a565b60005b600654811015610db957610d9b8460068381548110610d8157610d816117ae565b6000918252602090912001546001600160a01b03166109cb565b610da59083611796565b915080610db1816117e6565b915050610d60565b5092915050565b600260015403610de25760405162461bcd60e51b815260040161040a90611618565b60026001908155600a5460ff166002811115610e0057610e00611562565b14610e0a57600080fd5b6001600160a01b038116600090815260026020908152604080832033845290915290205480610e7b5760405162461bcd60e51b815260206004820152601f60248201527f5374616b696e672062616c616e63652063616e6e6f74206265207a65726f2100604482015260640161040a565b610e8f6001600160a01b0383163383611254565b6001600160a01b038216600090815260026020908152604080832033845282528083208390556003909152902054610ec9906001906117ff565b33600090815260036020526040902055505060018055565b600080546001600160a01b03163314610f0c5760405162461bcd60e51b815260040161040a906115e3565b5060085490565b6000805b600654811015610f7357826001600160a01b031660068281548110610f3e57610f3e6117ae565b6000918252602090912001546001600160a01b031603610f615750600192915050565b80610f6b816117e6565b915050610f17565b50600092915050565b6001600160a01b038082166000908152600460208190526040808320548151633fabe5a360e21b815291519394859491169283928592849263feaf968c928082019260a09290918290030181865afa158015610fdc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110009190611830565b5050509150506000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a9190611880565b919760ff909216965090945050505050565b6000546001600160a01b031633146110a65760405162461bcd60e51b815260040161040a906115e3565b6001600160a01b03811661110b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040a565b61111481611204565b50565b60058181548110610a6257600080fd5b6040516001600160a01b03808516602483015283166044820152606481018290526111929085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611289565b50505050565b6001600160a01b03808216600090815260026020908152604080832093861683529290522054611200576001600160a01b0382166000908152600360205260409020546111e6906001611796565b6001600160a01b0383166000908152600360205260409020555b5050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03831660248201526044810182905261128490849063a9059cbb60e01b9060640161115b565b505050565b60006112de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661135b9092919063ffffffff16565b80519091501561128457808060200190518101906112fc91906117c4565b6112845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161040a565b606061136a8484600085611374565b90505b9392505050565b6060824710156113d55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161040a565b843b6114235760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161040a565b600080866001600160a01b0316858760405161143f91906118cf565b60006040518083038185875af1925050503d806000811461147c576040519150601f19603f3d011682016040523d82523d6000602084013e611481565b606091505b509150915061149182828661149c565b979650505050505050565b606083156114ab57508161136d565b8251156114bb5782518084602001fd5b8160405162461bcd60e51b815260040161040a91906118eb565b80356001600160a01b03811681146114ec57600080fd5b919050565b6000806040838503121561150457600080fd5b82359150611514602084016114d5565b90509250929050565b60006020828403121561152f57600080fd5b61136d826114d5565b6000806040838503121561154b57600080fd5b611554836114d5565b9150611514602084016114d5565b634e487b7160e01b600052602160045260246000fd5b602081016003831061159a57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156115b257600080fd5b5035919050565b600080604083850312156115cc57600080fd5b6115d5836114d5565b946020939093013593505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156116a05781600019048211156116865761168661164f565b8085161561169357918102915b93841c939080029061166a565b509250929050565b6000826116b757506001610a4c565b816116c457506000610a4c565b81600181146116da57600281146116e457611700565b6001915050610a4c565b60ff8411156116f5576116f561164f565b50506001821b610a4c565b5060208310610133831016604e8410600b8410161715611723575081810a610a4c565b61172d8383611665565b80600019048211156117415761174161164f565b029392505050565b600061136d83836116a8565b600081600019048311821515161561176f5761176f61164f565b500290565b60008261179157634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156117a9576117a961164f565b500190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156117d657600080fd5b8151801515811461136d57600080fd5b6000600182016117f8576117f861164f565b5060010190565b6000828210156118115761181161164f565b500390565b805169ffffffffffffffffffff811681146114ec57600080fd5b600080600080600060a0868803121561184857600080fd5b61185186611816565b945060208601519350604086015192506060860151915061187460808701611816565b90509295509295909350565b60006020828403121561189257600080fd5b815160ff8116811461136d57600080fd5b60005b838110156118be5781810151838201526020016118a6565b838111156111925750506000910152565b600082516118e18184602087016118a3565b9190910192915050565b602081526000825180602084015261190a8160408501602087016118a3565b601f01601f1916919091016040019291505056fea2646970667358221220bd223a709bdeb2555c14eede7501f6a60fdac06eee70a038b7d3a62b74d344ec64736f6c634300080d00330000000000000000000000002d2110683797e7605795705197b0dffef5762e01

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063c5c4744c11610097578063e27af3b911610071578063e27af3b91461037f578063f1c5d6c214610392578063f2fde38b146103ba578063fd5e6dd1146103cd57600080fd5b8063c5c4744c1461034b578063d08c9dbd14610354578063dd5b84671461035c57600080fd5b80639e281a98116100d35780639e281a98146102f2578063af3f5e2214610305578063b83e023414610318578063bffa55d51461033857600080fd5b8063715018a6146102c6578063877dd39d146102ce5780638da5cb5b146102e157600080fd5b806327927b3e1161016657806357e11a011161014057806357e11a01146102895780635e5f2e26146102a35780636043903d146102b657806360ab5852146102be57600080fd5b806327927b3e1461021457806329161a0014610255578063401938831461028057600080fd5b806304bedc04146101ae5780630bea440d146101b857806315637548146101cb578063171e44ea146101d35780632636b945146101e6578063276b11da14610201575b600080fd5b6101b66103e0565b005b6101b66101c63660046114f1565b61042a565b6101b66108e0565b6101b66101e136600461151d565b61091d565b6101ee610999565b6040519081526020015b60405180910390f35b6101ee61020f366004611538565b6109cb565b61023d61022236600461151d565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f8565b6101ee610263366004611538565b600260209081526000928352604080842090915290825290205481565b6101ee60095481565b600a546102969060ff1681565b6040516101f89190611578565b61023d6102b13660046115a0565b610a52565b6101b6610a7c565b6101b6610aba565b6101b6610c05565b6101b66102dc366004611538565b610c3b565b6000546001600160a01b031661023d565b6101b66103003660046115b9565b610c93565b6101ee61031336600461151d565b610d02565b6101ee61032636600461151d565b60036020526000908152604090205481565b6101b661034636600461151d565b610dc0565b6101ee60085481565b6101ee610ee1565b61036f61036a36600461151d565b610f13565b60405190151581526020016101f8565b60075461023d906001600160a01b031681565b6103a56103a036600461151d565b610f7c565b604080519283526020830191909152016101f8565b6101b66103c836600461151d565b61107c565b61023d6103db3660046115a0565b611117565b6000546001600160a01b031633146104135760405162461bcd60e51b815260040161040a906115e3565b60405180910390fd5b600a80546002919060ff19166001835b0217905550565b60026001540361044c5760405162461bcd60e51b815260040161040a90611618565b60026001556000600a5460ff16600281111561046a5761046a611562565b1461047457600080fd5b600082116104c45760405162461bcd60e51b815260206004820152601e60248201527f416d6f756e74206d757374206265206d6f7265207468616e207a65726f210000604482015260640161040a565b6104cd81610f13565b6105195760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e2069732063757272656e746c79206e6f7420616c6c6f7765642100604482015260640161040a565b60008061052583610f7c565b600954919350915061053882600a611749565b6105428487611755565b61054c9190611774565b6008546105599190611796565b106105975760405162461bcd60e51b815260206004820152600e60248201526d546f6f206d756368206d6f6e657960901b604482015260640161040a565b60006105a482600a611749565b6105b78668056bc75e2d63100000611755565b6105c19190611774565b90506105d86001600160a01b038516333088611127565b6105e23385611198565b60006105ed33610d02565b1161063557600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b031916331790555b73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb47196001600160a01b038516016106dd576001600160a01b0384166000908152600260209081526040808320338452909152902054610689908290611796565b6001600160a01b03851660009081526002602090815260408083203384529091529020556106b882600a611749565b6106c28483611755565b6106cc9190611774565b6008546106d99190611796565b6008555b73dac17f958d2ee523a2206206994597c13d831ec6196001600160a01b03851601610785576001600160a01b0384166000908152600260209081526040808320338452909152902054610731908290611796565b6001600160a01b038516600090815260026020908152604080832033845290915290205561076082600a611749565b61076a8483611755565b6107749190611774565b6008546107819190611796565b6008555b736b175474e89094c44da98b954eedeac495271d0e196001600160a01b0385160161082d576001600160a01b03841660009081526002602090815260408083203384529091529020546107d9908690611796565b6001600160a01b038516600090815260026020908152604080832033845290915290205561080882600a611749565b6108128487611755565b61081c9190611774565b6008546108299190611796565b6008555b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc1196001600160a01b038516016108d5576001600160a01b0384166000908152600260209081526040808320338452909152902054610881908690611796565b6001600160a01b03851660009081526002602090815260408083203384529091529020556108b082600a611749565b6108ba8487611755565b6108c49190611774565b6008546108d19190611796565b6008555b505060018055505050565b6000546001600160a01b0316331461090a5760405162461bcd60e51b815260040161040a906115e3565b600a80546001919060ff19168280610423565b6000546001600160a01b031633146109475760405162461bcd60e51b815260040161040a906115e3565b600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b031633146109c45760405162461bcd60e51b815260040161040a906115e3565b5060095490565b6001600160a01b0382166000908152600360205260408120546109f057506000610a4c565b6000806109fc84610f7c565b9092509050610a0c81600a611749565b6001600160a01b038086166000908152600260209081526040808320938a1683529290522054610a3d908490611755565b610a479190611774565b925050505b92915050565b60068181548110610a6257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610aa65760405162461bcd60e51b815260040161040a906115e3565b600a80546000919060ff1916600183610423565b6000546001600160a01b03163314610ae45760405162461bcd60e51b815260040161040a906115e3565b600260015403610b065760405162461bcd60e51b815260040161040a90611618565b60026001556000600a5460ff166002811115610b2457610b24611562565b14610b2e57600080fd5b60005b600554811015610bfe57600060058281548110610b5057610b506117ae565b60009182526020822001546001600160a01b03169150610b6f82610d02565b60075460405163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905292935091169063a9059cbb906044016020604051808303816000875af1158015610bc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be891906117c4565b5050508080610bf6906117e6565b915050610b31565b5060018055565b6000546001600160a01b03163314610c2f5760405162461bcd60e51b815260040161040a906115e3565b610c396000611204565b565b6000546001600160a01b03163314610c655760405162461bcd60e51b815260040161040a906115e3565b6001600160a01b03918216600090815260046020526040902080546001600160a01b03191691909216179055565b6000546001600160a01b03163314610cbd5760405162461bcd60e51b815260040161040a906115e3565b600260015403610cdf5760405162461bcd60e51b815260040161040a90611618565b600260015581610cf96001600160a01b0382163384611254565b50506001805550565b6001600160a01b0381166000908152600360205260408120548190610d5d5760405162461bcd60e51b81526020600482015260116024820152704e6f20746f6b656e73207374616b65642160781b604482015260640161040a565b60005b600654811015610db957610d9b8460068381548110610d8157610d816117ae565b6000918252602090912001546001600160a01b03166109cb565b610da59083611796565b915080610db1816117e6565b915050610d60565b5092915050565b600260015403610de25760405162461bcd60e51b815260040161040a90611618565b60026001908155600a5460ff166002811115610e0057610e00611562565b14610e0a57600080fd5b6001600160a01b038116600090815260026020908152604080832033845290915290205480610e7b5760405162461bcd60e51b815260206004820152601f60248201527f5374616b696e672062616c616e63652063616e6e6f74206265207a65726f2100604482015260640161040a565b610e8f6001600160a01b0383163383611254565b6001600160a01b038216600090815260026020908152604080832033845282528083208390556003909152902054610ec9906001906117ff565b33600090815260036020526040902055505060018055565b600080546001600160a01b03163314610f0c5760405162461bcd60e51b815260040161040a906115e3565b5060085490565b6000805b600654811015610f7357826001600160a01b031660068281548110610f3e57610f3e6117ae565b6000918252602090912001546001600160a01b031603610f615750600192915050565b80610f6b816117e6565b915050610f17565b50600092915050565b6001600160a01b038082166000908152600460208190526040808320548151633fabe5a360e21b815291519394859491169283928592849263feaf968c928082019260a09290918290030181865afa158015610fdc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110009190611830565b5050509150506000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a9190611880565b919760ff909216965090945050505050565b6000546001600160a01b031633146110a65760405162461bcd60e51b815260040161040a906115e3565b6001600160a01b03811661110b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040a565b61111481611204565b50565b60058181548110610a6257600080fd5b6040516001600160a01b03808516602483015283166044820152606481018290526111929085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611289565b50505050565b6001600160a01b03808216600090815260026020908152604080832093861683529290522054611200576001600160a01b0382166000908152600360205260409020546111e6906001611796565b6001600160a01b0383166000908152600360205260409020555b5050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03831660248201526044810182905261128490849063a9059cbb60e01b9060640161115b565b505050565b60006112de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661135b9092919063ffffffff16565b80519091501561128457808060200190518101906112fc91906117c4565b6112845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161040a565b606061136a8484600085611374565b90505b9392505050565b6060824710156113d55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161040a565b843b6114235760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161040a565b600080866001600160a01b0316858760405161143f91906118cf565b60006040518083038185875af1925050503d806000811461147c576040519150601f19603f3d011682016040523d82523d6000602084013e611481565b606091505b509150915061149182828661149c565b979650505050505050565b606083156114ab57508161136d565b8251156114bb5782518084602001fd5b8160405162461bcd60e51b815260040161040a91906118eb565b80356001600160a01b03811681146114ec57600080fd5b919050565b6000806040838503121561150457600080fd5b82359150611514602084016114d5565b90509250929050565b60006020828403121561152f57600080fd5b61136d826114d5565b6000806040838503121561154b57600080fd5b611554836114d5565b9150611514602084016114d5565b634e487b7160e01b600052602160045260246000fd5b602081016003831061159a57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156115b257600080fd5b5035919050565b600080604083850312156115cc57600080fd5b6115d5836114d5565b946020939093013593505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156116a05781600019048211156116865761168661164f565b8085161561169357918102915b93841c939080029061166a565b509250929050565b6000826116b757506001610a4c565b816116c457506000610a4c565b81600181146116da57600281146116e457611700565b6001915050610a4c565b60ff8411156116f5576116f561164f565b50506001821b610a4c565b5060208310610133831016604e8410600b8410161715611723575081810a610a4c565b61172d8383611665565b80600019048211156117415761174161164f565b029392505050565b600061136d83836116a8565b600081600019048311821515161561176f5761176f61164f565b500290565b60008261179157634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156117a9576117a961164f565b500190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156117d657600080fd5b8151801515811461136d57600080fd5b6000600182016117f8576117f861164f565b5060010190565b6000828210156118115761181161164f565b500390565b805169ffffffffffffffffffff811681146114ec57600080fd5b600080600080600060a0868803121561184857600080fd5b61185186611816565b945060208601519350604086015192506060860151915061187460808701611816565b90509295509295909350565b60006020828403121561189257600080fd5b815160ff8116811461136d57600080fd5b60005b838110156118be5781810151838201526020016118a6565b838111156111925750506000910152565b600082516118e18184602087016118a3565b9190910192915050565b602081526000825180602084015261190a8160408501602087016118a3565b601f01601f1916919091016040019291505056fea2646970667358221220bd223a709bdeb2555c14eede7501f6a60fdac06eee70a038b7d3a62b74d344ec64736f6c634300080d0033

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

0000000000000000000000002d2110683797e7605795705197b0dffef5762e01

-----Decoded View---------------
Arg [0] : _timeTokenAddress (address): 0x2D2110683797E7605795705197B0dffEF5762E01

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002d2110683797e7605795705197b0dffef5762e01


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.