-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
70 lines (64 loc) · 1.26 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
# https://thegraph.com/docs/en/developing/creating-a-subgraph/#built-in-scalar-types
type Block @entity {
id: Bytes!
number: BigInt!
timestamp: BigInt!
gasUsed: BigInt!
baseFeePerGas: BigInt!
txns: [Txn!]! @derivedFrom(field: "block")
txnCount: Int!
minGasPrice: BigInt!
maxGasPrice: BigInt!
firstGasPrice: BigInt!
lastGasPrice: BigInt!
gasFees: BigInt!
burnedFees: BigInt!
minerTips: BigInt!
}
type Txn @entity(immutable: true) {
id: Bytes!
blockNumber: BigInt!
block: Block!
index: Int!
timestamp: BigInt!
gasUsed: BigInt!
gasPrice: BigInt!
gasFee: BigInt!
txnType: Int!
maxPriorityFeePerGas: BigInt!
burnedFee: BigInt!
minerTip: BigInt!
}
type BaseFeePerGasMinuteCandle @entity {
id: ID!
timestamp: BigInt!
" The highest value of base fee per gas within the minute "
open: BigInt
high: BigInt
low: BigInt
close: BigInt
}
type BaseFeePerGasHourCandle @entity {
id: ID!
timestamp: BigInt!
open: BigInt
high: BigInt
low: BigInt
close: BigInt
}
type BaseFeePerGasDayCandle @entity {
id: ID!
timestamp: BigInt!
open: BigInt
high: BigInt
low: BigInt
close: BigInt
}
type BaseFeePerGasWeekCandle @entity {
id: ID!
timestamp: BigInt!
open: BigInt
high: BigInt
low: BigInt
close: BigInt
}