availproject / bridge-api

Apache License 2.0
18 stars 10 forks source link

Add monitor to track failed claims #25

Open 0xSasaPrsic opened 3 months ago

0xSasaPrsic commented 3 months ago

Add a monitor that will be triggered if there is a failed claim. This can be achieved as a query to the new bridge monitoring service which will be running every x minutes and filter all failed vector execute extrinsics via subquery and check what is the call data.

Example query:

{
  extrinsics(
    first: 10,
    offset: 0,
    orderBy: TIMESTAMP_DESC
    filter: {
      module: { equalTo: "vector" }
      call: { equalTo: "execute" }
      success: { equalTo: false }
    }
  ) {
    totalCount
    nodes {
      id
      timestamp
      module
      extrinsicIndex
      success
      argsName
      argsValue
      blockId
    }
  }
}