-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathschema.graphql
73 lines (67 loc) · 1.28 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
type AccountBalance @entity {
id: ID!
account: Bytes!
token: Bytes!
balance: BigInt!
}
type TokenApproval @entity {
id: ID!
tokenId: BigInt!
approved: Boolean!
owner: Bytes
}
type TokenApprovalSnapshot @entity {
id: ID!
tokenId: BigInt!
approved: Boolean!
timestamp: BigInt!
owner: Bytes
}
type TokenBalance @entity {
id: ID!
tokenId: BigInt!
token: Bytes!
balance: BigInt!
}
type Token @entity {
#tokenid
id: ID!
account: Bytes
compoundCount: Int
compounded0: BigInt!
compounded1: BigInt!
currentSession: CompoundSession
sessions: [CompoundSession!]! @derivedFrom(field: "token")
}
type CompoundSession @entity {
id: ID!
startBlockNumber: BigInt!
endBlockNumber: BigInt
startTimestamp: BigInt!
endTimestamp: BigInt
account: Bytes!
token: Token!
compoundCount: Int!
amountAdded0: BigInt!
amountAdded1: BigInt!
reward0: BigInt!
reward1: BigInt!
compounds: [Compound!]! @derivedFrom(field: "session")
}
type Compound @entity {
id: ID!
txHash: Bytes!
blockNumber: BigInt!
timestamp: BigInt
account: Bytes!
tokenId: BigInt!
amountAdded0: BigInt!
amountAdded1: BigInt!
reward0: BigInt!
reward1: BigInt!
token0: Bytes!
token1: Bytes!
isOwner: Boolean!
session: CompoundSession
version: Int
}