blocklytics / spells-subgraph

Graph protocol subgraph for Spells.fyi
MIT License
6 stars 2 forks source link

Add expiresAtTimestamp to Tx #7

Closed calebsheridan closed 4 years ago

calebsheridan commented 4 years ago

Abstract

Some platforms enforce an expiry date, after which the Tx cannot be executed. This should be tracked at a Tx level.

Schema update

type Tx @entity {
  id: ID!            # Uses signature because transaction hash will not be the same across events
  eta: BigInt!
  createdAtTimestamp: BigInt!
  createdAtTransaction: String!
  value: BigInt!
  signature: String!               # Ideally decoded from matching keccack hash
  data: String!                    # Prepend with 0x
  target: Target!
  timelock: Timelock!
  isCancelled: Boolean!
  isExecuted: Boolean!
  cancelledAtTimestamp: BigInt     # Optional
  cancelledAtTransaction: String   # Optional
  executedAtTimestamp: BigInt      # Optional
  executedAtTransaction: String    # Optional
  expiresAtTimestamp: BigInt     # The new field; expiry timestamp (seconds) - Optional
}