-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
61 lines (58 loc) · 1.17 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
"""
Transaction data, including hash and timestamp
"""
type Transaction @entity {
"""
ID is transaction hash
"""
id: ID!
blockNumber: Int!
"""
The timestamp the transaction was confirmed
"""
timestamp: Int!
gasPrice: BigInt!
"""
The index of this transaction within the block
"""
index: Int!
"""
The account that initiated this transaction. This must be an Account and not a Contract.
"""
from: User!
"""
The contract the user interacted with
"""
to: Bytes
value: BigInt!
gasLimit: BigInt!
functionSignature: String!
}
type User @entity {
id: ID!
createdAt: Int!
}
type Approval @entity(immutable: true) {
id: Bytes!
owner: Bytes! # address
spender: Bytes! # address
value: BigInt! # uint256
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
timestamp: BigInt!
emittedBy: Bytes! #address
transaction: Transaction!
}
type Transfer @entity(immutable: true) {
id: Bytes!
from: Bytes! # address
to: Bytes! # address
value: BigInt! # uint256
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
timestamp: BigInt!
emittedBy: Bytes! #address
transaction: Transaction!
}