Skip to content

Commit

Permalink
simplify leaderboard schema and logic and add extrinsic and event id
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-aurele-besner committed Dec 11, 2024
1 parent 7559215 commit a84cca1
Show file tree
Hide file tree
Showing 3 changed files with 480 additions and 359 deletions.
192 changes: 96 additions & 96 deletions indexers/taurus/leaderboard/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,219 +5,219 @@
# account
type AccountTransferSenderTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type AccountTransferSenderTotalValueHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type AccountTransferReceiverTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type AccountTransferReceiverTotalValueHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type AccountRemarkCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type AccountExtrinsicTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type AccountExtrinsicSuccessTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type AccountExtrinsicFailedTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type AccountTransactionFeePaidTotalValueHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

# farmer
type FarmerVoteTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type FarmerVoteTotalValueHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type FarmerBlockTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type FarmerBlockTotalValueHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type FarmerVoteAndBlockTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type FarmerVoteAndBlockTotalValueHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

# operator
type OperatorTotalRewardsCollectedHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type OperatorTotalTaxCollectedHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type OperatorBundleTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type OperatorDepositsTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type OperatorDepositsTotalValueHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type OperatorWithdrawalsTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

# nominator/account
type NominatorDepositsTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type NominatorDepositsTotalValueHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}

type NominatorWithdrawalsTotalCountHistory @entity {
id: ID!
rank: Int! @index
value: BigInt! @index
value: BigInt!
lastContributionAt: Date!
createdAt: Int! @index
updatedAt: Int! @index
blockHeight: BigInt! @index
extrinsicId: String!
eventId: String!
}
Loading

0 comments on commit a84cca1

Please sign in to comment.