Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

gelatodigital/gelato-subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gelato Network Subgraph

This repository contains the schemas & event handlers that compose Gelato's Subgraph, enabling developers to easily fetch indexed data from the GelatoCore smart contract.

The respective smart contract can be found here.

This Subraph is available on the following Networks:

Queries

Querying All Task Receipt Wrappers of a certain User

On gelato, a user can submit a Task, which defines what conditions the gelato Executors should track and what actions they should execute on behalf of the user. When submitted, gelato emits a TaskReceipt, which contains additional information, such as how often the submitted Task should be executed, among others.

Gelato's Subgraph provide you with an API to query Task Receipt Wrappers, which basically contain a Task Receipt, plus additional information around its current status, transactions hashes, timestamps when it was submitted & executed and whether the User pays for the Task direcly (being a self-provider) or has someone else paying for him (external provider).

You can query every all TaskReceiptWrappers of a single User, in this case address 0xb0511d19216320e0612746cb24943300b03955f3 like this (make sure the address you're inputting is lowercase):

{
  taskReceiptWrappers(
    where: { user: "0xb0511d19216320e0612746cb24943300b03955f3" }
  ) {
    id
    taskReceipt {
      id
      userProxy
      provider {
        addr
        module
      }
      index
      tasks {
        conditions {
          inst
          data
        }
        actions {
          addr
          data
          operation
          dataFlow
          value
          termsOkCheck
        }
        selfProviderGasLimit
        selfProviderGasPriceCeil
      }
      expiryDate
      cycleId
      submissionsLeft
    }
    submissionHash
    status
    submissionDate
    executionDate
    executionHash
    selfProvided
  }
}

Help

If you have questions, feel free to shoot us a message in our Telegram or Discord channels!

Releases

No releases published

Packages

No packages published