forked from kelonye/uniswap-v3-staker-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathschema.graphql
65 lines (57 loc) · 1.18 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
type Incentive @entity {
id: ID!
contract: Bytes!
rewardToken: Bytes!
pool: Bytes!
startTime: BigInt!
endTime: BigInt!
refundee: Bytes!
reward: BigInt!
ended: Boolean!
positions: [IncentivePosition]! @derivedFrom(field: "incentive")
}
type IncentivePosition @entity {
id: ID!
position: Position!
incentive: Incentive!
claimed: BigInt!
}
type OwnerStaker @entity {
id: ID!
address: Bytes!
staker: Bytes!
lastUnstakedIncentivePosition: IncentivePosition
lastUnstakedTxHash: Bytes
}
type Position @entity {
id: ID!
owner: Bytes!
liquidity: BigInt!
stakes: [Stake]! @derivedFrom(field: "position")
unstakes: [Unstake]! @derivedFrom(field: "position")
claims: [Claim]! @derivedFrom(field: "position")
incentives: [IncentivePosition]! @derivedFrom(field: "position")
}
type Stake @entity {
id: ID!
txHash: Bytes!
timestamp: BigInt!
blockNumber: BigInt!
position: Position!
}
type Unstake @entity {
id: ID!
txHash: Bytes!
timestamp: BigInt!
blockNumber: BigInt!
position: Position!
}
type Claim @entity {
id: ID!
txHash: Bytes!
timestamp: BigInt!
blockNumber: BigInt!
position: Position!
amount: BigInt!
rewardToken: Bytes!
}