Skip to content

tellor-io/tellor.ioX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Development

  1. Go to folder 'frontend'

    cd frontend

  2. Install dependencies

    npm install

  3. Start the server

    npm start

  4. Open a browser: http://localhost:3000

[BELOW IS FROM PREVIOUS VERSION:]

App structure

Graphql data fetching

Contract events are cached and mapped into usable entities on thegraph https://thegraph.com/explorer/subgraph/tellor-io/lens https://thegraph.com/explorer/subgraph/tellor-io/lens-rinkeby

These entites can be queried at https://api.thegraph.com/subgraphs/name/tellor-io/lens https://api.thegraph.com/subgraphs/name/tellor-io/lens-rinkeby

This app uses react-apollo to handle the graph queries

  • ApolloProvider initialized in src/index.js
  • ApolloClient is then available throughout the app, see
  • Each view has data fetching components that grab the graphData and make it available for the other components in the view
  • Fetch component using the useQuery hook: src/components/shared/GraphFetch.js
  • graph queries: src/utils/queries.js
  • Resolver functions are called on each entity as it is fetched to hydrate/format the data to make component logic simpler: src/utils/resolvers.js

Styling

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages