Repository navigation
Expand file tree
/
Copy pathschema.graphql
More file actions
166 lines (152 loc) · 3.28 KB
/
Copy pathschema.graphql
File metadata and controls
166 lines (152 loc) · 3.28 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
type KVData @jsonField {
name: String
value: String
type: String
}
type Extrinsic @entity {
id: ID!
hash: String!
isSigned: Boolean
signer: Account
section: String
method: String
isSuccess: Boolean
signature: String
timestamp: Date
args: [KVData]
calls: [Call] @derivedFrom(field: "extrinsic")
}
type Account @entity {
id: ID!
txCount: Int
totalBalance: BigInt
freeBalance: BigInt
reducibleBalance: BigInt
reservedBalance: BigInt
miscFrozenBalance: BigInt
feeFrozenBalance: BigInt
isContract: Boolean
creator: Account
createdAt: String
extrinsics: [Extrinsic] @derivedFrom(field: "signer")
transferIn: [Transfer] @derivedFrom(field: "to")
transferOut: [Transfer] @derivedFrom(field: "from")
transactionIn: [Transaction] @derivedFrom(field: "to")
transactionOut: [Transaction] @derivedFrom(field: "from")
erc20_transferIn: [Erc20Transfer] @derivedFrom(field: "to")
erc20_transferOut: [Erc20Transfer] @derivedFrom(field: "from")
erc721_transferIn: [Erc721Transfer] @derivedFrom(field: "to")
erc721_transferOut: [Erc721Transfer] @derivedFrom(field: "from")
erc20_balance: [Erc20Balance] @derivedFrom(field: "account")
erc721_balance: [Erc721Balance] @derivedFrom(field: "account")
}
type Call @entity {
id: ID!
section: String
method: String
args:[KVData]
timestamp: Date
isSuccess: Boolean
signer: Account
extrinsic: Extrinsic
parentCall: Call
calls: [Call] @derivedFrom(field: "parentCall")
}
type Log @entity {
id: ID!
transaction: Transaction
transactionIndex: Int
logIndex: Int
timestamp: Date
address: String
data: String
topics: [String]
arguments: String
removed: Boolean
}
type Transaction @entity {
id: ID!
transactionHash: String
from: Account
to: Account
success: Boolean
value: BigInt
nonce: Int
gasLimit: BigInt
gasPrice: BigInt
gasUsed: BigInt
input_data: String
logs: [Log] @derivedFrom(field: "transaction")
erc20_transfer: [Erc20Transfer] @derivedFrom(field: "transaction")
erc721_transfer: [Erc721Transfer] @derivedFrom(field: "transaction")
}
type Erc20Transfer @entity {
id: ID!
from: Account
to: Account
token: Erc20Token
value: BigInt
transaction: Transaction
timestamp: Date
}
type Erc721Transfer @entity {
id: ID!
from: Account
to: Account
token: Erc721Token
value: BigInt
transaction: Transaction
timestamp: Date
}
type Transfer @entity {
id: ID!
from: Account!
to: Account!
token: Token
amount: BigInt!
timestamp: Date
isSuccess: Boolean
extrinsic: Extrinsic
}
type Token @entity {
id: ID!
name: String
decimal: Int
issuance: String
volume: String
txCount: BigInt
}
type Erc20Balance @entity {
id: ID!
account: Account
token: Erc20Token
value: BigInt
}
type Erc721Balance @entity {
id: ID!
account: Account
token: Erc721Token
value: BigInt
}
type Erc20Token @entity {
id: ID!
symbol: String
name: String
contract_address: String
decimals: Int
totalSupply: BigInt
nb_holders : Int
transfer_count: Int
balances: [Erc20Balance] @derivedFrom(field: "token")
}
type Erc721Token @entity {
id: ID!
symbol: String
name: String
contract_address: String
decimals: Int
totalSupply: String
nb_holders : Int
transfer_count: Int
balances: [Erc721Balance] @derivedFrom(field: "token")
}