tornado-governance-subgraph/schema.graphql

229 lines
3.8 KiB
GraphQL

type Proposal @entity(immutable: false) {
id: ID!
timestamp: Int!
blockNumber: Int!
logIndex: Int!
transactionHash: Bytes!
proposalId: Int!
proposer: Bytes!
target: Bytes!
startTime: Int!
endTime: Int!
forVotes: BigDecimal!
againstVotes: BigDecimal!
description: String!
executed: Boolean!
}
type Receipt @entity(immutable: false) {
id: ID!
proposalId: Int!
voter: Bytes!
support: Boolean!
votes: BigDecimal!
}
type Vote @entity(immutable: true) {
id: ID!
timestamp: Int!
blockNumber: Int!
logIndex: Int!
transactionHash: Bytes!
proposalId: Int!
voter: Bytes!
support: Boolean!
votes: BigDecimal!
from: Bytes!
input: Bytes!
}
type Delegate @entity(immutable: false) {
id: ID!
delegateTimestamp: Int!
delegateBlock: Int!
delegateTx: Bytes!
delegateLogIndex: Int!
undelegateTimestamp: Int!
undelegateBlock: Int!
undelegateTx: Bytes!
undelegateLogIndex: Int!
account: Bytes!
delegatedTo: Bytes!
delegatedFrom: [Bytes!]!
}
type DelegateEvent @entity(immutable: true) {
id: ID!
timestamp: Int!
blockNumber: Int!
logIndex: Int!
transactionHash: Bytes!
account: Bytes!
delegateTo: Bytes!
}
type UndelegateEvent @entity(immutable: true) {
id: ID!
timestamp: Int!
blockNumber: Int!
logIndex: Int!
transactionHash: Bytes!
account: Bytes!
delegateFrom: Bytes!
}
type Relayer @entity(immutable: false) {
id: ID!
address: Bytes!
ensName: String!
ensHash: Bytes!
workers: [Bytes!]!
stakeBalance: BigDecimal!
burnBalance: BigDecimal!
blockRegistration: Int!
registerTimestamp: Int!
registerTx: Bytes!
registerLogIndex: Int!
blockUnregisteration: Int!
unregisterTimestamp: Int!
unregisterTx: Bytes!
unregisterLogIndex: Int!
}
type StakeBurn @entity(immutable: false) {
id: ID!
timestamp: Int!
blockNumber: Int!
logIndex: Int!
transactionHash: Bytes!
relayer: Bytes!
amountBurned: BigDecimal!
amountBurnedUSD: BigDecimal!
instance: Bytes!
relayerFee: BigInt!
}
type StakeDailyBurn @entity(immutable: false) {
id: ID!
date: Int!
dailyAmountBurned: BigDecimal!
dailyAmountBurnedUSD: BigDecimal!
}
type RelayerDailyBurn @entity(immutable: false) {
id: ID!
relayer: Bytes!
date: Int!
dailyAmountBurned: BigDecimal!
dailyAmountBurnedUSD: BigDecimal!
}
type Instance @entity(immutable: true) {
id: ID!
timestamp: Int!
blockNumber: Int!
logIndex: Int!
transactionHash: Bytes!
address: Bytes!
}
type Withdrawal @entity(immutable: true) {
id: ID!
timestamp: Int!
blockNumber: Int!
logIndex: Int!
transactionHash: Bytes!
instance: Bytes!
to: Bytes!
nullifierHash: Bytes!
relayer: Bytes!
fee: BigInt!
}
type Balance @entity(immutable: false) {
id: ID!
address: Bytes!
balance: BigDecimal!
lockedBalance: BigDecimal!
claimedRewards: BigDecimal!
}
type Transfer @entity(immutable: true) {
id: ID!
timestamp: Int!
blockNumber: Int!
logIndex: Int!
transactionHash: Bytes!
type: String!
from: Bytes!
to: Bytes!
value: BigDecimal!
usdValue: BigDecimal!
}
type DataFeed @entity(immutable: false) {
id: ID!
name: String!
usdPrice: BigDecimal!
lastBlock: Int!
lastTimestamp: Int!
live: Boolean!
deprecatedBlock: Int!
}
type TornPair @entity(immutable: false) {
id: ID!
name: String!
ethPrice: BigDecimal!
lastBlock: Int!
lastTimestamp: Int!
}
type Stats @entity(immutable: false) {
id: ID!
timestamp: Int!
blockNumber: Int!
ethUsdPrice: BigDecimal!
tornUsdPrice: BigDecimal!
totalSupply: BigDecimal!
lockedSupply: BigDecimal!
burnedSupply: BigDecimal!
rewardedSupply: BigDecimal!
}
type StatsHourly @entity(immutable: false) {
id: ID!
timestamp: Int!
blockNumber: Int!
ethUsdPrice: BigDecimal!
tornUsdPrice: BigDecimal!
totalSupply: BigDecimal!
lockedSupply: BigDecimal!
burnedSupply: BigDecimal!
rewardedSupply: BigDecimal!
}