-
Notifications
You must be signed in to change notification settings - Fork 1
/
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
64
65
type User @entity {
id: ID!
poolShares: [PoolShare!] @derivedFrom(field: "user")
earnings: [Earning!] @derivedFrom(field: "user")
}
type Vault @entity {
id: ID! # VaultID
vaultId: BigInt!
address: Bytes!
assetAddress: Bytes!
xTokenAddress: Bytes!
xTokenWethAddress: Bytes!
inventoryStakedTotal: BigInt!
liquidityStakedTotal: BigInt!
shares: [String!]! ##PoolShareID
ticker: String # i.e. PUNK
}
type VaultAddressLookup @entity {
id: ID! #Address
vault: Vault!
}
type PoolShare @entity {
id: ID!
vault: Vault!
user: User!
inventoryShare: BigDecimal!
liquidityShare: BigDecimal!
}
type Earning @entity {
id: ID!
feeReceipt: FeeReceipt!
vault: Vault!
isInventory: Boolean!
user: User!
amount: BigDecimal
}
type UserVaultFeeAggregate @entity {
id: ID! # UserID - Vault - Inventory/LP
isInventory: Boolean!
user: User!
vault: Vault!
aggregatedVaultFees: BigDecimal!
}
type FeeReceipt @entity {
id: ID!
timestamp: BigInt!
isInventory: Boolean!
vault: Vault!
amount: BigDecimal!
feeDistribution: [Earning!] @derivedFrom(field: "feeReceipt")
}
type Token @entity {
id: ID!
vault: Vault!
isUsed: Boolean!
isInventory: Boolean!
}