LogoLogo
  • The Basics
    • Welcome
    • Fundamentals
    • Contracts Overview
    • Contracts Reference
    • Tutorials
  • Getting Data
    • Introduction
    • Solidity Integration
    • User Checklists
    • Local Testing
    • Testnet
    • Creating a Query
    • Funding a Feed
    • Tellor Functions
    • DataSpecs Registry
    • SnapShot Vote Results
  • Reporting Data
    • Introduction
    • Becoming a Reporter
    • Getting Paid
  • Disputing Data
    • Introduction
    • Monitoring
    • How to Dispute
    • Voting/Resolution
  • Vulnerability Disclosure
Powered by GitBook
On this page
  • Available Tellor Functions
  • _getDataAfter
  • _getDataBefore
  • _getIndexForDataAfter
  • _getIndexForDataBefore
  • _getMultipleValuesBefore
  • _getNewValueCountbyQueryId
  • _getReporterByTimestamp
  • _getTimestampbyQueryIdandIndex
  • _isInDispute
  • _retrieveData

Was this helpful?

  1. Getting Data

Tellor Functions

PreviousFunding a FeedNextDataSpecs Registry

Last updated 1 year ago

Was this helpful?

Available Tellor Functions

When your contract inherits the helper contract, it has access to the following functions:

_getDataAfter

Retrieves the next undisputed value for a given queryId after a given timestamp

function _getDataAfter(bytes32 _queryId, uint256 _timestamp)
        internal
        view
        returns (bytes memory _value, uint256 _timestampRetrieved);

_getDataBefore

Finds the most recent undisputed submission for a given queryId before a specific timestamp.

  • It is recommended that you use this function with a buffer time when retrieving oracle values. This for bad values to be disputed.

function _getDataBefore(bytes32 _queryId, uint256 _timestamp)
        internal
        view
        returns (bytes memory _value, uint256 _timestampRetrieved);

_getIndexForDataAfter

Returns the index of the next value reported for a given queryId after a given timestamp.

function _getIndexForDataAfter(bytes32 _queryId, uint256 _timestamp)
        internal
        view
        returns (bool _found, uint256 _index);

_getIndexForDataBefore

Returns the index of the most recent value reported for a given queryId before a given timestamp.

function _getIndexForDataBefore(bytes32 _queryId, uint256 _timestamp)
        internal
        view
        returns (bool _found, uint256 _index);

_getMultipleValuesBefore

Returns the multiple most recent values for a given queryId before a given timestamp.

function _getMultipleValuesBefore(
        bytes32 _queryId,
        uint256 _timestamp,
        uint256 _maxAge,
        uint256 _maxCount
    )
        internal
        view
        returns (bytes[] memory _values, uint256[] memory _timestamps);

_getNewValueCountbyQueryId

Returns the total number of values submitted for a given queryId

function _getNewValueCountbyQueryId(bytes32 _queryId)
        internal
        view
        returns (uint256);

_getReporterByTimestamp

Retrieves the address of the reporter for a given queryId and timestamp.

function _getReporterByTimestamp(bytes32 _queryId, uint256 _timestamp)
        internal
        view
        returns (address);

_getTimestampbyQueryIdandIndex

Returns the timestamp at a specific index for a given queryId.

  • Values start at the 0 index

function _getTimestampbyQueryIdandIndex(bytes32 _queryId, uint256 _index)
        internal
        view
        returns (uint256);

_isInDispute

Determines whether a specific value with a given queryId and timestamp has been disputed

function _isInDispute(bytes32 _queryId, uint256 _timestamp)
        internal
        view
        returns (bool);

_retrieveData

Retrieves a specific value by queryId and timestamp

function _retrieveData(bytes32 _queryId, uint256 _timestamp)
        internal
        view
        returns (bytes memory);
usingtellor
allows time