synapsecns/sanguine

View on GitHub
services/explorer/graphql/server/graph/schema/queries.graphql

Summary

Maintainability
Test Coverage
type Query {

  """
  Returns bridged transactions filterable by chain, to/from address, to/from txn hash, token address, and keccak hash.
  """
  bridgeTransactions(
    chainIDFrom:        [Int]
    chainIDTo:        [Int]
    addressFrom:        String
    addressTo:        String
    maxAmount:      Int
    minAmount:      Int
    maxAmountUsd:      Int
    minAmountUsd:      Int
    startTime:      Int
    endTime:        Int
    txnHash:        String
    kappa:          String
    pending:        Boolean
    useMv:          Boolean = false
    page:           Int = 1
    tokenAddressFrom:   [String]
    tokenAddressTo:   [String]
    onlyCCTP:           Boolean = false
  ): [BridgeTransaction]

  """
  Message bus transactions
  """
  messageBusTransactions(
    chainID:        [Int]
    contractAddress:        String
    startTime:      Int
    endTime:        Int
    txnHash:        String
    messageID:      String
    pending:        Boolean = false
    reverted:       Boolean = false
    page:           Int = 1
  ): [MessageBusTransaction]


  """
  Returns the COUNT of bridged transactions for a given chain. If direction of bridge transactions
  is not specified, it defaults to IN.
  Specifying no duration defaults to the last 24 hours.
  """
  countByChainId(
    chainID:    Int
    address:    String
    direction:  Direction = IN
    hours:      Int = 720
  ): [TransactionCountResult]
  """
  Returns counts of token addresses source and time.
  Specifying no parameters defaults to origin and 24 hours.
  """
  countByTokenAddress(
    chainID:    Int
    address:    String
    direction:  Direction = IN
    hours:      Int = 24
  ): [TokenCountResult]
  """
  Returns addresses and transaction count (origin) over time.
  Specifying no parameters defaults to 24 hours.
  """
  addressRanking(hours: Int = 24): [AddressRanking]

  """
  Returns mean/median/total/count of transactions transacted for a given duration, chain and address.
  Specifying no duration defaults to ALL_TIME, and no chain or address searches across all.
  """
  amountStatistic(
    type:         StatisticType!
    duration:     Duration = ALL_TIME
    platform:     Platform = ALL
    chainID:      Int
    address:      String
    tokenAddress: String
    useCache: Boolean = false
    useMv:          Boolean = false

  ): ValueResult

  """
  Daily statistic data
  """
  dailyStatisticsByChain(
    chainID:  Int
    type:     DailyStatisticType = VOLUME
    platform: Platform = ALL
    duration:     Duration = ALL_TIME
    useCache: Boolean = false
    useMv:          Boolean = false

  ): [DateResultByChain]

  """
Ranked chainIDs by volume
  """
  rankedChainIDsByVolume(
    duration:     Duration = ALL_TIME
    useCache: Boolean = false
  ): [VolumeByChainID]

  """
  Get wallet information
  """
  addressData(
    address: String!
  ): AddressData


  """
  Get LeaderBoard
  """
  leaderboard(
    duration:     Duration = ALL_TIME
    chainID:      Int
    useMv: Boolean = true
    page:           Int = 1
  ): [Leaderboard]


  """
  GetOriginBridgeTx is the bridge watcher endpoint for getting an origin bridge tx (BETA).
  """
  getOriginBridgeTx(
    chainID:      Int!
    txnHash:       String!
    bridgeType:   BridgeType!
  ): BridgeWatcherTx


  """
  GetDestinationBridgeTx is the bridge watcher endpoint for getting an destination bridge tx (BETA).
  """
  getDestinationBridgeTx(
    chainID:      Int!
    address:     String!
    kappa:      String!
    timestamp:   Int!
    bridgeType:   BridgeType!
    historical:  Boolean = false
  ): BridgeWatcherTx


  """
  GetBlockHeight gets block heights from the current bridge. Returns results in an array of increased block heights.
  """
  getBlockHeight(
    contracts: [ContractQuery]
  ): [BlockHeight]
}