Contract 0xF281e2De3bB71dE348040b10B420615104359c10 2

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x95500c2bac7dc484d0152d9135084bbf1a58661f39d0ed9f7b53094fc3dd3794Submit Value104927442022-04-12 17:43:1037 days 18 hrs ago0x86a81e48688ad1828c213bb3a5edf003cba87812 IN  0xf281e2de3bb71de348040b10b420615104359c100 Ether0.000267825003 1.000000013
0x210a069e000b982e1f9de58ecb1c0f5a9ac9f5ee606302c9f0069bc443aa1b220x6080604099851992022-01-13 18:38:14126 days 17 hrs ago0xb93b2016f98a91912d7211318b95f3cb809dbd11 IN  Create: TellorPlayground0 Ether0.004193706897 2.500004112
[ Download CSV Export 
Latest 5 internal transactions
Parent Txn Hash Block From To Value
0x0fb06fa05bd9ce40531306cbe3440b440cb6c3f71b09d8c658efa3de7e92a690104927522022-04-12 17:45:1237 days 18 hrs ago 0xa2809560ec620352e3cff8e852b4da17247b62db 0xf281e2de3bb71de348040b10b420615104359c100 Ether
0x0fb06fa05bd9ce40531306cbe3440b440cb6c3f71b09d8c658efa3de7e92a690104927522022-04-12 17:45:1237 days 18 hrs ago 0xa2809560ec620352e3cff8e852b4da17247b62db 0xf281e2de3bb71de348040b10b420615104359c100 Ether
0x0fb06fa05bd9ce40531306cbe3440b440cb6c3f71b09d8c658efa3de7e92a690104927522022-04-12 17:45:1237 days 18 hrs ago 0xa2809560ec620352e3cff8e852b4da17247b62db 0xf281e2de3bb71de348040b10b420615104359c100 Ether
0x0fb06fa05bd9ce40531306cbe3440b440cb6c3f71b09d8c658efa3de7e92a690104927522022-04-12 17:45:1237 days 18 hrs ago 0xa2809560ec620352e3cff8e852b4da17247b62db 0xf281e2de3bb71de348040b10b420615104359c100 Ether
0x0fb06fa05bd9ce40531306cbe3440b440cb6c3f71b09d8c658efa3de7e92a690104927522022-04-12 17:45:1237 days 18 hrs ago 0xa2809560ec620352e3cff8e852b4da17247b62db 0xf281e2de3bb71de348040b10b420615104359c100 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TellorPlayground

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 300 runs

Other Settings:
default evmVersion
File 1 of 1 : TellorPlayground.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract TellorPlayground {
    // Events
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event NewReport(
        bytes32 _queryId,
        uint256 _time,
        bytes _value,
        uint256 _reward,
        uint256 _nonce,
        bytes _queryData,
        address _reporter
    );
    event NewStaker(address _staker, uint256 _amount);
    event TipAdded(
        address indexed _user,
        bytes32 indexed _queryId,
        uint256 _tip,
        uint256 _totalTip,
        bytes _queryData
    );
    event StakeWithdrawRequested(address _staker, uint256 _amount);
    event StakeWithdrawn(address _staker);
    event Transfer(address indexed from, address indexed to, uint256 value);

    // Storage
    mapping(bytes32 => address) public addresses;
    mapping(bytes32 => mapping(uint256 => bool)) public isDisputed; //queryId -> timestamp -> value
    mapping(bytes32 => mapping(uint256 => address)) public reporterByTimestamp;
    mapping(address => StakeInfo) stakerDetails; //mapping from a persons address to their staking info
    mapping(bytes32 => uint256[]) public timestamps;
    mapping(bytes32 => uint256) public tips; // mapping of data IDs to the amount of TRB they are tipped
    mapping(bytes32 => mapping(uint256 => bytes)) public values; //queryId -> timestamp -> value
    mapping(bytes32 => uint256[]) public voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
    mapping(address => mapping(address => uint256)) private _allowances;
    mapping(address => uint256) private _balances;

    uint256 public constant timeBasedReward = 5e17; // time based reward for a reporter for successfully submitting a value
    uint256 public timeOfLastNewValue = block.timestamp; // time of the last new value, originally set to the block timestamp
    uint256 public tipsInContract; // number of tips within the contract
    uint256 public voteCount;
    uint256 private _totalSupply;
    string private _name;
    string private _symbol;
    uint8 private _decimals;

    // Structs
    struct StakeInfo {
        uint256 startDate; //stake start date
        uint256 stakedBalance; // staked balance
        uint256 lockedBalance; // amount locked for withdrawal
        uint256 reporterLastTimestamp; // timestamp of reporter's last reported value
        uint256 reportsSubmitted; // total number of reports submitted by reporter
    }

    // Functions
    /**
     * @dev Initializes playground parameters
     */
    constructor() {
        _name = "TellorPlayground";
        _symbol = "TRBP";
        _decimals = 18;
        addresses[
            keccak256(abi.encodePacked("_GOVERNANCE_CONTRACT"))
        ] = address(this);
    }

    /**
     * @dev Approves amount that an address is alowed to spend of behalf of another
     * @param _spender The address which is allowed to spend the tokens
     * @param _amount The amount that msg.sender is allowing spender to use
     * @return bool Whether the transaction succeeded
     *
     */
    function approve(address _spender, uint256 _amount)
        public
        virtual
        returns (bool)
    {
        _approve(msg.sender, _spender, _amount);
        return true;
    }

    /**
     * @dev A mock function to create a dispute
     * @param _queryId The tellorId to be disputed
     * @param _timestamp the timestamp of the value to be disputed
     */
    function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
        values[_queryId][_timestamp] = bytes("");
        isDisputed[_queryId][_timestamp] = true;
        voteCount++;
        voteRounds[keccak256(abi.encodePacked(_queryId, _timestamp))].push(
            voteCount
        );
    }

    /**
     * @dev Public function to mint tokens to the given address
     * @param _user The address which will receive the tokens
     */
    function faucet(address _user) external {
        _mint(_user, 1000 ether);
    }

    /**
     * @dev A mock function to submit a value to be read without reporter staking needed
     * @param _queryId the ID to associate the value to
     * @param _value the value for the queryId
     * @param _nonce the current value count for the query id
     * @param _queryData the data used by reporters to fulfill the data query
     */
    // slither-disable-next-line timestamp
    function submitValue(
        bytes32 _queryId,
        bytes calldata _value,
        uint256 _nonce,
        bytes memory _queryData
    ) external {
        require(
            _nonce == timestamps[_queryId].length,
            "nonce should be correct"
        );
        require(
            _queryId == keccak256(_queryData) || uint256(_queryId) <= 100,
            "id must be hash of bytes data"
        );
        values[_queryId][block.timestamp] = _value;
        timestamps[_queryId].push(block.timestamp);
        // Send tips + timeBasedReward to reporter and reset tips for ID
        (uint256 _tip, uint256 _reward) = getCurrentReward(_queryId);
        if (_reward + _tip > 0) {
            transfer(msg.sender, _reward + _tip);
        }
        timeOfLastNewValue = block.timestamp;
        tipsInContract -= _tip;
        tips[_queryId] = 0;
        reporterByTimestamp[_queryId][block.timestamp] = msg.sender;
        stakerDetails[msg.sender].reporterLastTimestamp = block.timestamp;
        stakerDetails[msg.sender].reportsSubmitted++;
        emit NewReport(
            _queryId,
            block.timestamp,
            _value,
            _tip + _reward,
            _nonce,
            _queryData,
            msg.sender
        );
    }

    /**
     * @dev Adds a tip to a given query ID.
     * @param _queryId is the queryId to look up
     * @param _amount is the amount of tips
     * @param _queryData is the extra bytes data needed to fulfill the request
     */
    function tipQuery(
        bytes32 _queryId,
        uint256 _amount,
        bytes memory _queryData
    ) external {
        require(
            _queryId == keccak256(_queryData) || uint256(_queryId) <= 100,
            "id must be hash of bytes data"
        );
        _transfer(msg.sender, address(this), _amount);
        _amount = _amount / 2;
        _burn(address(this), _amount);
        tipsInContract += _amount;
        tips[_queryId] += _amount;
        emit TipAdded(
            msg.sender,
            _queryId,
            _amount,
            tips[_queryId],
            _queryData
        );
    }

    /**
     * @dev Transfer tokens from one user to another
     * @param _recipient The destination address
     * @param _amount The amount of tokens, including decimals, to transfer
     * @return bool If the transfer succeeded
     */
    function transfer(address _recipient, uint256 _amount)
        public
        virtual
        returns (bool)
    {
        _transfer(msg.sender, _recipient, _amount);
        return true;
    }

    /**
     * @dev Transfer tokens from user to another
     * @param _sender The address which owns the tokens
     * @param _recipient The destination address
     * @param _amount The quantity of tokens to transfer
     * @return bool Whether the transfer succeeded
     */
    function transferFrom(
        address _sender,
        address _recipient,
        uint256 _amount
    ) public virtual returns (bool) {
        _transfer(_sender, _recipient, _amount);
        _approve(
            _sender,
            msg.sender,
            _allowances[_sender][msg.sender] - _amount
        );
        return true;
    }

    // Tellor Flex
    /**
     * @dev Allows a reporter to submit stake
     * @param _amount amount of tokens to stake
     */
    function depositStake(uint256 _amount) external {
        StakeInfo storage _staker = stakerDetails[msg.sender];
        if (_staker.lockedBalance > 0) {
            if (_staker.lockedBalance >= _amount) {
                _staker.lockedBalance -= _amount;
            } else {
                require(
                    _transferFrom(
                        msg.sender,
                        address(this),
                        _amount - _staker.lockedBalance
                    )
                );
                _staker.lockedBalance = 0;
            }
        } else {
            require(_transferFrom(msg.sender, address(this), _amount));
        }
        _staker.startDate = block.timestamp; // This resets their stake start date to now
        _staker.stakedBalance += _amount;
        emit NewStaker(msg.sender, _amount);
    }

    /**
     * @dev Allows a reporter to request to withdraw their stake
     * @param _amount amount of staked tokens requesting to withdraw
     */
    function requestStakingWithdraw(uint256 _amount) external {
        StakeInfo storage _staker = stakerDetails[msg.sender];
        require(
            _staker.stakedBalance >= _amount,
            "insufficient staked balance"
        );
        _staker.startDate = block.timestamp;
        _staker.lockedBalance += _amount;
        _staker.stakedBalance -= _amount;
        emit StakeWithdrawRequested(msg.sender, _amount);
    }

    /**
     * @dev Withdraws a reporter's stake
     */
    function withdrawStake() external {
        StakeInfo storage _s = stakerDetails[msg.sender];
        // Ensure reporter is locked and that enough time has passed
        require(block.timestamp - _s.startDate >= 7 days, "7 days didn't pass");
        require(_s.lockedBalance > 0, "reporter not locked for withdrawal");
        _transfer(address(this), msg.sender, _s.lockedBalance);
        _s.lockedBalance = 0;
        emit StakeWithdrawn(msg.sender);
    }

    /**
     * @dev Returns the reporter for a given timestamp and queryId
     * @param _queryId bytes32 version of the queryId
     * @param _timestamp uint256 timestamp of report
     * @return address of data reporter
     */
    function getReporterByTimestamp(bytes32 _queryId, uint256 _timestamp)
        external
        view
        returns (address)
    {
        return reporterByTimestamp[_queryId][_timestamp];
    }

    /**
     * @dev Allows users to retrieve all information about a staker
     * @param _staker address of staker inquiring about
     * @return uint startDate of staking
     * @return uint current amount staked
     * @return uint current amount locked for withdrawal
     * @return uint reporter's last reported timestamp
     * @return uint total number of reports submitted by reporter
     */
    function getStakerInfo(address _staker)
        external
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        return (
            stakerDetails[_staker].startDate,
            stakerDetails[_staker].stakedBalance,
            stakerDetails[_staker].lockedBalance,
            stakerDetails[_staker].reporterLastTimestamp,
            stakerDetails[_staker].reportsSubmitted
        );
    }

    // Getters
    /**
     * @dev Returns the amount that an address is alowed to spend of behalf of another
     * @param _owner The address which owns the tokens
     * @param _spender The address that will use the tokens
     * @return uint256 The amount of allowed tokens
     */
    function allowance(address _owner, address _spender)
        public
        view
        virtual
        returns (uint256)
    {
        return _allowances[_owner][_spender];
    }

    /**
     * @dev Returns the balance of a given user.
     * @param _account user address
     * @return uint256 user's token balance
     */
    function balanceOf(address _account) public view returns (uint256) {
        return _balances[_account];
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * @return uint8 the number of decimals; used only for display purposes
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev Calculates the current reward for a reporter given tips and time based reward
     * @param _queryId is ID of the specific data feed
     * @return uint256 tip amount for given query ID
     * @return uint256 time based reward
     */
    // slither-disable-next-line timestamp
    function getCurrentReward(bytes32 _queryId)
        public
        view
        returns (uint256, uint256)
    {
        uint256 _timeDiff = block.timestamp - timeOfLastNewValue;
        uint256 _reward = (_timeDiff * timeBasedReward) / 300; //.5 TRB per 5 minutes (should we make this upgradeable)
        if (balanceOf(address(this)) < _reward + tipsInContract) {
            _reward = balanceOf(address(this)) - tipsInContract;
        }
        return (tips[_queryId], _reward);
    }

    /**
     * @dev Counts the number of values that have been submitted for a given ID
     * @param _queryId the ID to look up
     * @return uint256 count of the number of values received for the queryId
     */
    function getNewValueCountbyQueryId(bytes32 _queryId)
        public
        view
        returns (uint256)
    {
        return timestamps[_queryId].length;
    }

    /**
     * @dev Gets the timestamp for the value based on their index
     * @param _queryId is the queryId to look up
     * @param _index is the value index to look up
     * @return uint256 timestamp
     */
    function getTimestampbyQueryIdandIndex(bytes32 _queryId, uint256 _index)
        public
        view
        returns (uint256)
    {
        uint256 len = timestamps[_queryId].length;
        if (len == 0 || len <= _index) return 0;
        return timestamps[_queryId][_index];
    }

    /**
     * @dev Returns an array of voting rounds for a given vote
     * @param _hash is the identifier hash for a vote
     * @return uint256[] memory dispute IDs of the vote rounds
     */
    function getVoteRounds(bytes32 _hash)
        public
        view
        returns (uint256[] memory)
    {
        return voteRounds[_hash];
    }

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

    /**
     * @dev Retrieves value from oracle based on queryId/timestamp
     * @param _queryId being requested
     * @param _timestamp to retrieve data/value from
     * @return bytes value for queryId/timestamp submitted
     */
    function retrieveData(bytes32 _queryId, uint256 _timestamp)
        public
        view
        returns (bytes memory)
    {
        return values[_queryId][_timestamp];
    }

    /**
     * @dev Returns the symbol of the token.
     * @return string symbol of the token
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the total supply of the token.
     * @return uint256 total supply of token
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    // Internal functions
    /**
     * @dev Internal function to approve tokens for the user
     * @param _owner The owner of the tokens
     * @param _spender The address which is allowed to spend the tokens
     * @param _amount The amount that msg.sender is allowing spender to use
     */
    function _approve(
        address _owner,
        address _spender,
        uint256 _amount
    ) internal virtual {
        require(_owner != address(0), "ERC20: approve from the zero address");
        require(_spender != address(0), "ERC20: approve to the zero address");
        _allowances[_owner][_spender] = _amount;
        emit Approval(_owner, _spender, _amount);
    }

    /**
     * @dev Internal function to burn tokens for the user
     * @param _account The address whose tokens to burn
     * @param _amount The quantity of tokens to burn
     */
    function _burn(address _account, uint256 _amount) internal virtual {
        require(_account != address(0), "ERC20: burn from the zero address");
        _balances[_account] -= _amount;
        _totalSupply -= _amount;
        emit Transfer(_account, address(0), _amount);
    }

    /**
     * @dev Internal function to create new tokens for the user
     * @param _account The address which receives minted tokens
     * @param _amount The quantity of tokens to min
     */
    function _mint(address _account, uint256 _amount) internal virtual {
        require(_account != address(0), "ERC20: mint to the zero address");
        _totalSupply += _amount;
        _balances[_account] += _amount;
        emit Transfer(address(0), _account, _amount);
    }

    /**
     * @dev Internal function to perform token transfer
     * @param _sender The address which owns the tokens
     * @param _recipient The destination address
     * @param _amount The quantity of tokens to transfer
     */
    function _transfer(
        address _sender,
        address _recipient,
        uint256 _amount
    ) internal virtual {
        require(_sender != address(0), "ERC20: transfer from the zero address");
        require(
            _recipient != address(0),
            "ERC20: transfer to the zero address"
        );
        _balances[_sender] -= _amount;
        _balances[_recipient] += _amount;
        emit Transfer(_sender, _recipient, _amount);
    }

    /**
     * @dev Allows this contract to transfer tokens from one user to another
     * @param _sender The address which owns the tokens
     * @param _recipient The destination address
     * @param _amount The quantity of tokens to transfer
     * @return bool Whether the transfer succeeded
     */
    function _transferFrom(
        address _sender,
        address _recipient,
        uint256 _amount
    ) internal virtual returns (bool) {
        _transfer(_sender, _recipient, _amount);
        _approve(
            _sender,
            msg.sender,
            _allowances[_sender][address(this)] - _amount
        );
        return true;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 300
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_time","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_value","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nonce","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_queryData","type":"bytes"},{"indexed":false,"internalType":"address","name":"_reporter","type":"address"}],"name":"NewReport","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"NewStaker","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"StakeWithdrawRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_staker","type":"address"}],"name":"StakeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_tip","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_totalTip","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_queryData","type":"bytes"}],"name":"TipAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"addresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"beginDispute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"faucet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"}],"name":"getCurrentReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"}],"name":"getNewValueCountbyQueryId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getReporterByTimestamp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"getStakerInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getTimestampbyQueryIdandIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"getVoteRounds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"isDisputed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"reporterByTimestamp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"requestStakingWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"retrieveData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"bytes","name":"_value","type":"bytes"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_queryData","type":"bytes"}],"name":"submitValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeBasedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeOfLastNewValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"timestamps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_queryData","type":"bytes"}],"name":"tipQuery","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"tips","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tipsInContract","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"values","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"voteCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"voteRounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawStake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405242600a553480156200001557600080fd5b506040805180820190915260108082526f15195b1b1bdc941b185e59dc9bdd5b9960821b60209092019182526200004f91600e9162000114565b50604080518082019091526004808252630545242560e41b60209092019182526200007d91600f9162000114565b506010805460ff1916601217905560405130906000908190620000c6906020017f5f474f5645524e414e43455f434f4e5452414354000000000000000000000000815260140190565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550620001f7565b8280546200012290620001ba565b90600052602060002090601f01602090048101928262000146576000855562000191565b82601f106200016157805160ff191683800117855562000191565b8280016001018555821562000191579182015b828111156200019157825182559160200191906001019062000174565b506200019f929150620001a3565b5090565b5b808211156200019f5760008155600101620001a4565b600181811c90821680620001cf57607f821691505b60208210811415620001f157634e487b7160e01b600052602260045260246000fd5b50919050565b611b3a80620002076000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c806377b03e0d1161011a578063c5958af9116100ad578063ce5e11bf1161007c578063ce5e11bf14610530578063dd62ed3e14610543578063e07c54861461057c578063ef0234ad146105b0578063f25133f3146105c357610206565b8063c5958af9146104ee578063c638407114610501578063c979fe9f1461050a578063cb82cc8f1461051d57610206565b8063a1e588a5116100e9578063a1e588a514610498578063a9059cbb146104c0578063b86d1d63146104d3578063bed9d861146104e657610206565b806377b03e0d1461044e5780638929f4c61461046e57806395d89b411461048157806396426d971461048957610206565b8063313ce5671161019d578063699f200f1161016c578063699f200f1461037b57806369d43bd3146103a45780636fd4f229146103ad57806370a08231146103b6578063733bdef0146103df57610206565b8063313ce567146103055780635eaa9ced1461031a578063602bf2271461032d57806364473df21461034d57610206565b80631f379acc116101d95780631f379acc14610271578063217053c01461028657806323b872dd146102d2578063248638e5146102e557610206565b806306fdde031461020b578063091b50ff14610229578063095ea7b31461023c57806318160ddd1461025f575b600080fd5b6102136105d6565b60405161022091906119d9565b60405180910390f35b610213610237366004611867565b610668565b61024f61024a366004611781565b61070d565b6040519015158152602001610220565b600d545b604051908152602001610220565b61028461027f366004611867565b610724565b005b6102ba610294366004611867565b60026020908152600092835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b039091168152602001610220565b61024f6102e0366004611746565b6107ec565b6102f86102f33660046117aa565b61083e565b6040516102209190611921565b60105460405160ff9091168152602001610220565b6102846103283660046117c2565b6108a1565b61026361033b3660046117aa565b60056020526000908152604090205481565b61024f61035b366004611867565b600160209081526000928352604080842090915290825290205460ff1681565b6102ba6103893660046117aa565b6000602081905290815260409020546001600160a01b031681565b610263600b5481565b610263600a5481565b6102636103c43660046116f3565b6001600160a01b031660009081526009602052604090205490565b6104266103ed3660046116f3565b6001600160a01b031660009081526003602081905260409091208054600182015460028301549383015460049093015491949093929190565b604080519586526020860194909452928401919091526060830152608082015260a001610220565b61026361045c3660046117aa565b60009081526004602052604090205490565b61028461047c3660046117aa565b610aba565b610213610b95565b6102636706f05b59d3b2000081565b6104ab6104a63660046117aa565b610ba4565b60408051928352602083019190915201610220565b61024f6104ce366004611781565b610c37565b6102846104e13660046116f3565b610c44565b610284610c5a565b6102136104fc366004611867565b610d68565b610263600c5481565b610263610518366004611867565b610e16565b61028461052b3660046117aa565b610e47565b61026361053e366004611867565b610f23565b610263610551366004611714565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6102ba61058a366004611867565b60009182526002602090815260408084209284529190529020546001600160a01b031690565b6102846105be366004611888565b610f90565b6102636105d1366004611867565b6110a1565b6060600e80546105e590611a82565b80601f016020809104026020016040519081016040528092919081815260200182805461061190611a82565b801561065e5780601f106106335761010080835404028352916020019161065e565b820191906000526020600020905b81548152906001019060200180831161064157829003601f168201915b5050505050905090565b60066020908152600092835260408084209091529082529020805461068c90611a82565b80601f01602080910402602001604051908101604052809291908181526020018280546106b890611a82565b80156107055780601f106106da57610100808354040283529160200191610705565b820191906000526020600020905b8154815290600101906020018083116106e857829003601f168201915b505050505081565b600061071a3384846110bd565b5060015b92915050565b60408051602080820180845260008084528681526006835284812086825290925292902090516107549290611548565b5060008281526001602081815260408084208585529091528220805460ff19169091179055600c80549161078783611abd565b91905055506007600083836040516020016107ac929190918252602082015260400190565b60408051601f19818403018152918152815160209283012083528282019390935291016000908120600c5481546001810183559183529290912001555050565b60006107f98484846111d9565b6001600160a01b03841660009081526008602090815260408083203380855292529091205461083491869161082f908690611a6b565b6110bd565b5060019392505050565b60008181526007602090815260409182902080548351818402810184019094528084526060939283018282801561089457602002820191906000526020600020905b815481526020019060010190808311610880575b505050505090505b919050565b60008581526004602052604090205482146109035760405162461bcd60e51b815260206004820152601760248201527f6e6f6e63652073686f756c6420626520636f727265637400000000000000000060448201526064015b60405180910390fd5b80516020820120851480610918575060648511155b6109645760405162461bcd60e51b815260206004820152601d60248201527f6964206d7573742062652068617368206f66206279746573206461746100000060448201526064016108fa565b600085815260066020908152604080832042845290915290206109889085856115cc565b5060008581526004602090815260408220805460018101825590835290822042910155806109b587610ba4565b909250905060006109c68383611a14565b11156109dc576109da336104ce8484611a14565b505b42600a8190555081600b60008282546109f59190611a6b565b909155505060008781526005602090815260408083208390556002825280832042808552908352818420805473ffffffffffffffffffffffffffffffffffffffff191633908117909155845260039283905290832091820155600401805491610a5d83611abd565b909155507fab1d593f8e2ecb165106e30a39db6769078d35c3fdbb110f24932f0d7af68c29905087428888610a928688611a14565b898933604051610aa9989796959493929190611965565b60405180910390a150505050505050565b3360009081526003602052604090206001810154821115610b1d5760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e74207374616b65642062616c616e6365000000000060448201526064016108fa565b428155600281018054839190600090610b37908490611a14565b9250508190555081816001016000828254610b529190611a6b565b909155505060408051338152602081018490527f3d8d9df4bd0172df32e557fa48e96435cd7f2cac06aaffacfaee608e6f7898ef91015b60405180910390a15050565b6060600f80546105e590611a82565b6000806000600a5442610bb79190611a6b565b9050600061012c610bd06706f05b59d3b2000084611a4c565b610bda9190611a2c565b9050600b5481610bea9190611a14565b306000908152600960205260409020541015610c2057600b5430600090815260096020526040902054610c1d9190611a6b565b90505b600094855260056020526040909420549492505050565b600061071a3384846111d9565b610c5781683635c9adc5dea00000611340565b50565b336000908152600360205260409020805462093a8090610c7a9042611a6b565b1015610cbd5760405162461bcd60e51b8152602060048201526012602482015271372064617973206469646e2774207061737360701b60448201526064016108fa565b6000816002015411610d1c5760405162461bcd60e51b815260206004820152602260248201527f7265706f72746572206e6f74206c6f636b656420666f72207769746864726177604482015261185b60f21b60648201526084016108fa565b610d2b303383600201546111d9565b600060028201556040513381527f4a7934670bd8304e7da22378be1368f7c4fef17c5aee81804beda8638fe428ec9060200160405180910390a150565b60008281526006602090815260408083208484529091529020805460609190610d9090611a82565b80601f0160208091040260200160405190810160405280929190818152602001828054610dbc90611a82565b8015610e095780601f10610dde57610100808354040283529160200191610e09565b820191906000526020600020905b815481529060010190602001808311610dec57829003601f168201915b5050505050905092915050565b60076020528160005260406000208181548110610e3257600080fd5b90600052602060002001600091509150505481565b336000908152600360205260409020600281015415610eba5781816002015410610e8a5781816002016000828254610e7f9190611a6b565b90915550610eb59050565b610ea43330836002015485610e9f9190611a6b565b611420565b610ead57600080fd5b600060028201555b610ece565b610ec5333084611420565b610ece57600080fd5b428155600181018054839190600090610ee8908490611a14565b909155505060408051338152602081018490527fa96c2cce65119a2170d1711a6e82f18f2006448828483ba7545e5954765436479101610b89565b600082815260046020526040812054801580610f3f5750828111155b15610f4e57600091505061071e565b6000848152600460205260409020805484908110610f7c57634e487b7160e01b600052603260045260246000fd5b906000526020600020015491505092915050565b80516020820120831480610fa5575060648311155b610ff15760405162461bcd60e51b815260206004820152601d60248201527f6964206d7573742062652068617368206f66206279746573206461746100000060448201526064016108fa565b610ffc3330846111d9565b611007600283611a2c565b91506110133083611464565b81600b60008282546110259190611a14565b909155505060008381526005602052604081208054849290611048908490611a14565b909155505060008381526005602052604090819020549051849133917fd951d408a0f5057da5c25b826fb5ce403d56542962b6ac6994dbc6d5432fbff5916110949187919087906119ec565b60405180910390a3505050565b60046020528160005260406000208181548110610e3257600080fd5b6001600160a01b03831661111f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108fa565b6001600160a01b0382166111805760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108fa565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101611094565b6001600160a01b03831661123d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108fa565b6001600160a01b03821661129f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108fa565b6001600160a01b038316600090815260096020526040812080548392906112c7908490611a6b565b90915550506001600160a01b038216600090815260096020526040812080548392906112f4908490611a14565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161109491815260200190565b6001600160a01b0382166113965760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108fa565b80600d60008282546113a89190611a14565b90915550506001600160a01b038216600090815260096020526040812080548392906113d5908490611a14565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b600061142d8484846111d9565b6001600160a01b0384166000908152600860209081526040808320308452909152902054610834908590339061082f908690611a6b565b6001600160a01b0382166114c45760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016108fa565b6001600160a01b038216600090815260096020526040812080548392906114ec908490611a6b565b9250508190555080600d60008282546115059190611a6b565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611414565b82805461155490611a82565b90600052602060002090601f01602090048101928261157657600085556115bc565b82601f1061158f57805160ff19168380011785556115bc565b828001600101855582156115bc579182015b828111156115bc5782518255916020019190600101906115a1565b506115c8929150611640565b5090565b8280546115d890611a82565b90600052602060002090601f0160209004810192826115fa57600085556115bc565b82601f106116135782800160ff198235161785556115bc565b828001600101855582156115bc579182015b828111156115bc578235825591602001919060010190611625565b5b808211156115c85760008155600101611641565b80356001600160a01b038116811461089c57600080fd5b600082601f83011261167c578081fd5b813567ffffffffffffffff8082111561169757611697611aee565b604051601f8301601f19908116603f011681019082821181831017156116bf576116bf611aee565b816040528381528660208588010111156116d7578485fd5b8360208701602083013792830160200193909352509392505050565b600060208284031215611704578081fd5b61170d82611655565b9392505050565b60008060408385031215611726578081fd5b61172f83611655565b915061173d60208401611655565b90509250929050565b60008060006060848603121561175a578081fd5b61176384611655565b925061177160208501611655565b9150604084013590509250925092565b60008060408385031215611793578182fd5b61179c83611655565b946020939093013593505050565b6000602082840312156117bb578081fd5b5035919050565b6000806000806000608086880312156117d9578081fd5b85359450602086013567ffffffffffffffff808211156117f7578283fd5b818801915088601f83011261180a578283fd5b813581811115611818578384fd5b896020828501011115611829578384fd5b6020830196508095505060408801359350606088013591508082111561184d578283fd5b5061185a8882890161166c565b9150509295509295909350565b60008060408385031215611879578182fd5b50508035926020909101359150565b60008060006060848603121561189c578283fd5b8335925060208401359150604084013567ffffffffffffffff8111156118c0578182fd5b6118cc8682870161166c565b9150509250925092565b60008151808452815b818110156118fb576020818501810151868301820152016118df565b8181111561190c5782602083870101525b50601f01601f19169290920160200192915050565b6020808252825182820181905260009190848201906040850190845b818110156119595783518352928401929184019160010161193d565b50909695505050505050565b600089825288602083015260e060408301528660e083015261010087898285013781818985010152601f19601f8901168301876060850152866080850152818482030160a08501526119b9828201876118d6565b925050506001600160a01b03831660c08301529998505050505050505050565b60006020825261170d60208301846118d6565b600084825283602083015260606040830152611a0b60608301846118d6565b95945050505050565b60008219821115611a2757611a27611ad8565b500190565b600082611a4757634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a6657611a66611ad8565b500290565b600082821015611a7d57611a7d611ad8565b500390565b600181811c90821680611a9657607f821691505b60208210811415611ab757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611ad157611ad1611ad8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212208a8ce4359b0f5b2e858ead8c4944aa0f9899821134aa39eb956619b01503e3e064736f6c63430008030033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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.