Tellor Access allows the fellowship (a specified group chosen by the community) to provide numerical data to any chain.
Use this repository if your project needs:
- Faster Data Availability
- Higher security than a centralized party
- Allow your community to vote in or designate data providers transparently
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 {}
...
}
- 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;
- 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;
Install Dependencies
npm i
Compile Smart Contracts
npx hardhat compile
Test Locally
npx hardhat test
This repository is maintained by the Tellor team
Check out our issues log here on Github or reach out to us if you have any ideas!
Tellor Inc. 2021