Skip to content

Commit

Permalink
Unnecessary indexing logic removed
Browse files Browse the repository at this point in the history
  • Loading branch information
bgodlin committed Mar 24, 2022
1 parent 32b1082 commit 811a563
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 681 deletions.
40 changes: 0 additions & 40 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,6 @@ dataSources:
handlers:
- handler: handleHistoryElement
kind: substrate/CallHandler
- handler: handleReward
kind: substrate/EventHandler
filter:
module: staking
method: Reward
- handler: handleRewarded
kind: substrate/EventHandler
filter:
module: staking
method: Rewarded
- handler: handleSlash
kind: substrate/EventHandler
filter:
module: staking
method: Slash
- handler: handleSlashed
kind: substrate/EventHandler
filter:
module: staking
method: Slashed
- handler: handleBonded
kind: substrate/EventHandler
filter:
module: staking
method: Bonded
- handler: handleUnbonded
kind: substrate/EventHandler
filter:
module: staking
method: Unbonded
- handler: handleTransfer
kind: substrate/EventHandler
filter:
Expand All @@ -57,13 +27,3 @@ dataSources:
filter:
module: balances
method: transfer_keep_alive
- handler: handleNewEra
kind: substrate/EventHandler
filter:
module: staking
method: StakingElection
- handler: handleStakersElected
kind: substrate/EventHandler
filter:
module: staking
method: StakersElected
55 changes: 1 addition & 54 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@ type Transfer @jsonField {
success: Boolean!
}

type Reward @jsonField {
eventIdx: Int!
amount: String!
isReward: Boolean!,
era: Int,
stash: String,
validator: String
}

type AccumulatedReward @entity {
id: ID! #address
amount: BigInt!
}

type Extrinsic @jsonField {
hash: String!
module: String!
Expand All @@ -36,50 +22,11 @@ type HistoryElement @entity {
extrinsicHash: String
timestamp: BigInt! @index
address: String! @index
reward: Reward
extrinsic: Extrinsic
transfer: Transfer
}

type EraValidatorInfo @entity {
id: ID!
address: String! @index
era: Int! @index
total: BigInt!
own: BigInt!
others: [IndividualExposure]!
}

type IndividualExposure @jsonField {
who: String!
value: String!
}

#enum StakeChangeType {
# bonded
# unbonded
# slashed
# rewarded
#}

type StakeChange @entity {
id: ID!
blockNumber: Int!
extrinsicHash: String
eventIdx: Int!
timestamp: BigInt! @index
address: String! @index
amount: BigInt!
accumulatedAmount: BigInt!
type: String!
}

type AccumulatedStake @entity {
id: ID!
amount: BigInt!
}

type ErrorEvent @entity {
id: ID!
description: String!
}
}
5 changes: 1 addition & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//Exports all handler functions
export * from './mappings/HistoryElements'
export * from './mappings/Rewards'
export * from './mappings/Transfers'
export * from './mappings/NewEra'
export * from './mappings/StakeChanged'
export * from './mappings/Transfers'
125 changes: 0 additions & 125 deletions src/mappings/Cache.ts

This file was deleted.

33 changes: 0 additions & 33 deletions src/mappings/NewEra.ts

This file was deleted.

Loading

0 comments on commit 811a563

Please sign in to comment.