Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
/ tellorAccess Public archive

A streamlined tellor run by a group of trusted signers

License

Notifications You must be signed in to change notification settings

tellor-io/tellorAccess

Repository files navigation

Coverage Status

tellor.io

Twitter WeAreTellor

Tellor Access allows the fellowship (a specified group chosen by the community) to provide numerical data to any chain.

Why use Tellor Access

Use this repository if your project needs:

  1. Faster Data Availability
  2. Higher security than a centralized party
  3. Allow your community to vote in or designate data providers transparently

How to use

Reading values

The first step is to inherit the TellorAccess contract by passing the TellorAccess address as a constructor argument:

Here's an example

contract BtcPriceContract is TellorAccess {

  //This Contract now has access to all functions on TellorAccess

  uint256 btcPrice;
  uint256 btcRequetId = 2;

  constructor(address payable tellorAccessAddress) TellorAcess(tellorAccessAddress) public {}

  ...
}

Submitting values to tellorAccess

  1. Allow the list of reporters to provide data by running the function addReporter for each one of them.
    /**
     * @dev Add an address to the reporter role. Restricted to admins.
     * @param reporter_address is the address of the reporter to give permissions to submit data
     */
    function addReporter(address reporter_address) public virtual onlyAdmin;
  1. Have reporters submit data by running the function submitValue
    /**
    * @dev A function to submit a values by reporters
    * @param _requestId The tellorId to associate the value to
    * @param _value the value for the requestId
    */
    function submitValue(uint256 _requestId,uint256 _value)  external;

Local set up and testing

Install Dependencies

npm i

Compile Smart Contracts

npx hardhat compile

Test Locally

npx hardhat test

Maintainers

This repository is maintained by the Tellor team

How to Contribute

Join our Discord or Telegram:

Check out our issues log here on Github or reach out to us if you have any ideas!

Copyright

Tellor Inc. 2021