dyzz / TellorCore

Mineable Token to provide Oracle Data

Home Page:https://tellor.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tellor.io

Twitter WeAreTellor

Overview

Ethereum smart contracts cannot access off-chain data. If your smart contract relies on off-chain (e.g. internet) data to evaluate or execute a function, you either have to manually feed the data to your contract, incentivize users to do it, or rely on a centralized party to provide the data.

The Tellor oracle is a decentralized oracle. It provides an option for contracts to securely interact with and obtain data from off-chain.

For more indepth information about Tellor checkout our documenation, whitepaper and FAQ page.

Quick references are included below:

  • Implement Tellor into your project
  1. Use npm to istall the usingTellor repo.
npm install usingTellor
  1. Import UsingTellor.sol into your smart contract and ensure your contract inherits from it by adding "is UsingTellor".

  2. Pass through the user contract address ( 0x09459fdafD6Fdce14E04B3487A656FBca0b953ea ) in your constructor. See example below:

pragma solidity ^0.5.0;

import './UsingTellor.sol';

contract YourContract is UsingTellor{
 ...
    constructor(address _userContract) UsingTellor(_userContract) public{

    }   
    /**
    * @dev Allows the user to get the latest value for the requestId specified
    * @param _requestId is the requestId to look up the value for
    * @return bool true if it is able to retreive a value, the value, and the value's timestamp
    */
    function getLastValue(uint256 _requestId) public view returns (bool ifRetrieve, uint256 value, uint256 _timestampRetrieved) {
        return getCurrentValue(_requestId);
    }
 ...
}

Useful Links

Metamask - www.metamask.io
Truffle - http://truffleframework.com/

Maintainers

@themandalore
@brendaloya

How to Contribute

Join our Discord or Telegram:

Check out our issues log here on Github or contribute to our future plans to build a better miner and more examples of data secured by Tellor.

Contributors

This repository is maintained by the Tellor team - www.tellor.io

Copyright

Tellor Inc. 2019

About

Mineable Token to provide Oracle Data

https://tellor.io

License:MIT License


Languages

Language:Solidity 79.3%Language:JavaScript 17.6%Language:Python 3.0%Language:HTML 0.1%Language:Shell 0.0%