forked from dydxfoundation/dydx-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
118 lines (89 loc) · 2.66 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
type User @entity {
"ID attribute is user public key"
id: ID!
totalTokens: BigInt!
totalStakedTokens: BigInt!
votingPower: BigInt!
proposingPower: BigInt!
tokenVotingPower: BigInt!
tokenProposingPower: BigInt!
stakedTokenVotingPower: BigInt!
stakedTokenProposingPower: BigInt!
"Number of proposals voted on"
numberVotes: Int!
"Proposals that the delegate has created"
proposals: [Proposal!]! @derivedFrom(field: "proposer")
"Votes that a delegate has made in different proposals"
votes: [ProposalVote!]! @derivedFrom(field: "user")
}
type Proposal @entity {
"ID attribute is proposal ID"
id: ID!
"User that proposed the change"
proposer: User!
"Targets data for the change"
targets: [Bytes!]
"Values data for the change"
values: [BigInt!]
"Signature data for the change"
signatures: [String!]
"Call data for the change"
calldatas: [Bytes!]
"With delegate calls param from event"
withDelegateCalls: [Boolean!]
"Block number proposal was created in"
creationBlock: BigInt!
"Timestamp of block proposal was created in"
creationTime: BigInt!
"Block number from where the voting starts"
startBlock: BigInt!
"Block number from where the voting ends"
endBlock: BigInt!
"Once the proposal is queued for execution it will have an ETA of the execution"
executionETA: BigInt
"Block that proposal was queued"
queuedBlock: BigInt
"Timestamp of block that proposal was queued"
queuedTime: BigInt
"The strategy used for the proposal"
strategy: Bytes!
"IPFS hash of proposal description"
ipfsHash: Bytes!
"Block number proposal was executed in"
executionBlock: BigInt
"Timestamp of block proposal was executed in"
executionTime: BigInt
"Block number proposal was canceled in"
cancellationBlock: BigInt
"Timestamp of block proposal was canceled in"
cancellationTime: BigInt
"Votes associated to this proposal"
votes: [ProposalVote!]! @derivedFrom(field: "proposal")
}
type ProposalVote @entity {
"ID attribute is a function of user ID and proposal ID, e.g. {user.id}-{proposal.id}"
id: ID!
proposal: Proposal!
user: User!
support: Boolean!
votingPower: BigInt!
}
type RewardsClaimed @entity {
"ID attribute is a function of user ID and rewards claim number at the time of claiming, e.g. {user.id}-{incentivesModule}-{claimTimestamp}"
id: ID!
user: User!
incentivesModule: IncentivesModule!
claimTimestamp: BigInt!
rewards: BigInt!
}
type Governance @entity {
"Unique entity used to keep track of common aggregated data"
id: ID!
"Number of proposals created"
proposals: BigInt!
}
enum IncentivesModule {
MerkleDistributor
SafetyModule
LiquidityStaking
}