-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
95 lines (86 loc) · 1.47 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
enum SaleType {
primary
secondary
}
enum Network {
xdai
mainnet
local
kovan
sokol
binance
dot
}
type Note @entity {
id: ID!
noteNumber: BigInt!
jsonUrl: String!
issuer: Issuer!
limit: BigInt!
count: BigInt
tokens: [Token!] @derivedFrom(field: "note")
sales: [Sale!] @derivedFrom(field: "note")
createdAt: BigInt
mintPrice: BigInt
mintPriceSetAt: BigInt
mintPriceNonce: BigInt
}
type Token @entity {
id: ID!
note: Note!
owner: Bytes!
createdAt: BigInt!
network: Network!
price: BigInt
priceSetAt: BigInt
transfers: [TokenTransfer!] @derivedFrom(field: "token")
sales: [Sale!] @derivedFrom(field: "token")
upgradeTransfer: TokenTransfer
}
type Issuer @entity {
id: ID!
address: Bytes!
note: [Note]! @derivedFrom(field: "issuer")
noteCount: BigInt!
earnings: BigInt
sales: [Sale!] @derivedFrom(field: "issuer")
}
type Sale @entity {
id: ID!
buyer: Bytes!
seller: Bytes
price: BigInt!
token: Token!
note: Note!
issuer: Issuer!
createdAt: BigInt!
issuerTake: BigInt!
saleType: SaleType
transfer: TokenTransfer!
}
type TokenTransfer @entity {
id: ID!
token: Token!
from: Bytes!
to: Bytes!
createdAt: BigInt!
network: Network!
}
type RelayPrice @entity {
id: ID!
createdAt: BigInt!
price: BigInt!
}
type MetaData @entity {
id: ID!
value: String!
}
type Total @entity {
id: ID!
day: BigInt
notes: BigInt
tokens: BigInt
sales: BigInt
upgrades: BigInt
issuers: BigInt
}