# Tellor One-Stop Doc™ ![](https://i.imgur.com/bUb3kEC.png) ## The Ultimate Guide to hacking on Tellor –*EthOnline2022 Edition* *Hey Hackers! Welcome to your One-Stop Doc™ which includes everything you need to know about getting your project using Tellor’s oracle and ensuring you have an easy guided path to qualifying for a bounty.* ### Our bounties for EthOnline 2022: 🎉 Tellor is offering a $5000 prize pool for integrations with the top amounts going to projects that meet these two requirements: 1. ✅ Submit link to deployed and verified contract that integrates “Using Tellor” 2. ✅ Use the Tellor contracts to configure Incentives forTip/pay testnet reporters to provide your data - must submit a tx hash of this tip/payment. Refer to Hacker’s Guide to learn more. The key take-away is that we want to see true usage of Tellor demonstrated by those two requirements. **(Don’t worry we’ll guide you through it.)** ## Example Ideas * Create a [Dynamic NFT](https://youtu.be/SNfkvbX-bH0) that visually changes based on the price change of a cryptocurrency like (Click the link for a tutorial on how!) * Build a DAO controlled governance contract that allows for gasless voting by the community using Tellor to put snapshot.org votes on-chain * There’s no free lunch in crypto right? Create a contract that refunds gas to users who transact to receive an airdrop! ## now...we build. ![](https://i.imgur.com/jqlEcWk.png) This beginner's guide is here to showcase the ease with which one can get up and running with Tellor. One of the most basic use cases for oracles are data feeds. So let's start with Tellor's version of a simple data feed for testnet: NumericApiResponse. > NumericApiRespose is a [query type](https://docs.tellor.io/tellor/getting-data/introduction#some-quick-definitions-before-we-move-on) to report numerical values from any API to Tellor oracles. *Only use this query type for testnet, as data sources with single points-of-failure shouldn't be used in production.* ## In this tutorial we'll go over: - Setting up the initial toolkit you'll need to get up and running. - Walk through a simple example. - List out testnet addresses of networks you currently can test Tellor on. ## UsingTellor The first thing you'll want to do is install the basic tools necessary for using Tellor as your oracle. Use [this package](https://github.com/tellor-io/usingtellor) to install the Tellor user contracts: `npm install usingtellor` Once installed this will allow your contracts to inherit the functions from the contract 'UsingTellor'. Great! Now that you've got the tools ready, let's go through a simple exercise where we can retrieve any API data using Tellor: from the Rick and Morty API!: ### Rick and Morty API Example Inherit the UsingTellor contract, passing the Tellor address as a constructor argument, Here's an example, along with a [video tutorial](https://youtu.be/kl20UdhOqnY) to walk you through it: ```solidity import "usingtellor/contracts/UsingTellor.sol"; contract UsingTellorDemo is UsingTellor { // This Contract now has access to all functions in UsingTellor // REF: https://github.com/tellor-io/dataSpecs/blob/main/types/NumericApiResponse.md string url = "https://rickandmortyapi.com/api/episode"; //url of API string parseArgs = "info, count"; //arguments we need to parse the JSON response constructor(address payable _tellorAddress) UsingTellor(_tellorAddress) {} function readValue() external view returns (...) { //build our queryData bytes memory queryData = abi.encode("NumericApiResponse", abi.encode(url, parseArgs)); //hash it (build our queryId) bytes32 queryId = keccak256(queryData); //get our data (bool success, bytes memory value, uyint256timestamp) = getCurrentValue(queryId); //decode our data return abi.decode(value, (uint256)); ``` Once you've [deployed](https://github.com/tellor-io/UsingTellorDemo/blob/main/scripts/deploy.js) your contract, you can then get TRB from the [TRB Faucet](https://twitter.com/trbfaucet) and start tipping the reporters for your data! ### How to Tip via Etherscan: 1. call approve with the tip amount in the [token contract](https://goerli.etherscan.io/address/0x7B8AC044ebce66aCdF14197E8De38C1Cc802dB4A#writeContract) 1. call tip in [autopay contract](https://goerli.etherscan.io/address/0x7B49420008BcA14782F2700547764AdAdD54F813#writeContract) <br>***Don't forget** to submit a link to your tip tx into the *#sponsor-tellor* channel in the ethglobal discord. This is will ensure you get a data reporter to respond to your request and additionally is a requirement for a prize. ## 🎉🎉🎉 *Congrats! you're now an official member of the Tellor User Family!* --- --- --- ### Need More Inspiration on what to build? Let's start with giving you an idea of what the Tellor oracle can provide…Anything! But here’s some highlights: * [Spot Prices](https://github.com/tellor-io/dataSpecs/blob/main/types/SpotPrice.md) * [TWAP](https://github.com/tellor-io/dataSpecs/blob/main/types/TWAP.md) * [Numeric API Responses ](https://github.com/tellor-io/dataSpecs/blob/main/types/NumericApiResponse.md) * [Random Number Generator](https://github.com/tellor-io/dataSpecs/blob/main/types/TellorRNG.md) * [Historical Gas price oracle](https://github.com/tellor-io/dataSpecs/blob/main/types/GasPriceOracle.md) * [SnapshotVoteResults](https://github.com/tellor-io/dataSpecs/blob/main/types/Snapshot.md) **And more!** Need something super custom? [You can generate your own custom query](https://querybuilder.tellor.io/custom)! **Want to try a different data type? Check out the list of supported queries, or create a new one here: [Current Data Feeds](https://github.com/tellor-io/dataSpecs/tree/main/types)** **You can find a comprehensive list of the addresses on all networks Tellor currently supports here: [**Addresses**](https://docs.tellor.io/tellor/the-basics/contracts-reference)** **For a more robust implementation of the Tellor oracle, check out the full list of available functions here: [Tellor Github](https://github.com/tellor-io/usingtellor/blob/master/README.md)**