-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
103 lines (84 loc) · 1.83 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
type IndexedChain @entity {
id: ID!
# retrieved from the db / archive node on a timer
currentBlock: Int
headBlock: Int
# retrieved via subsquid archive registry
info: IndexedChainInfo
archive: String
# set via graphql mutation
enabled: Boolean
startBlock: Int
ss58Format: Int
# defaults to `https://${id}.subscan.io`, but this is sometimes wrong
# can be fixed via graphql mutation
subscanUrl: String
calamarUrl: String
}
type IndexedChainInfo {
name: String
displayName: String
tokens: [String!]!
website: String
description: String
relayChain: String
parachainId: String
genesisHash: String
}
type Block @entity {
id: ID!
blockNumber: Int!
blockHash: String!
timestamp: DateTime!
chainId: String!
ss58Format: Int!
events: [Event!]! @derivedFrom(field: "block")
calls: [Call!]! @derivedFrom(field: "block")
extrinsics: [Extrinsic!]! @derivedFrom(field: "block")
}
type Address @entity {
id: ID!
events: [AddressEvent!]! @derivedFrom(field: "address")
}
type AddressEvent @entity {
id: ID!
address: Address!
event: Event!
}
type Event @entity {
id: ID!
name: String!
args: JSON
phase: String!
indexInBlock: Int!
relatedAddresses: [AddressEvent!]! @derivedFrom(field: "event")
block: Block!
call: Call
extrinsic: Extrinsic
}
type Call @entity {
id: ID!
name: String!
data: JSON
block: Block!
events: [Event!]! @derivedFrom(field: "call")
extrinsics: [Extrinsic!]! @derivedFrom(field: "call")
parent: Call
calls: [Call!]! @derivedFrom(field: "parent")
}
type Extrinsic @entity {
id: ID!
version: Int!
hash: String!
indexInBlock: Int!
fee: BigInt
tip: BigInt
success: Boolean
error: String
signer: String
signature: String
signatureType: String
block: Block!
events: [Event!]! @derivedFrom(field: "extrinsic")
call: Call
}