-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
85 lines (74 loc) · 1.55 KB
/
Copy pathschema.graphql
File metadata and controls
85 lines (74 loc) · 1.55 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
type MonstaNFT @entity {
id: ID!
# owner : Bytes
createdAuctions:[AuctionCreate!]! @derivedFrom(field: "token")
cancelledAuctions: [AuctionCancel!]! @derivedFrom(field: "token")
successfulAuctions: [AuctionSucceed!]! @derivedFrom(field: "token")
transfers: [Transfer!]! @derivedFrom(field: "token")
rebirths: [MonstaRebirth!]! @derivedFrom(field: "token")
retires: [MonstaRetire!]! @derivedFrom(field: "token")
evolves: [MonstaEvolve!]! @derivedFrom(field: "token")
spawn: MonstaSpawn @derivedFrom(field: "token")
}
enum AuctionType {
UserAuction
SystemAuction
}
type AuctionCreate @entity {
id: ID!
token: MonstaNFT!
startingPrice: BigInt!
endingPrice: BigInt!
duration: BigInt!
seller: Bytes!
timestamp: BigInt!
type: AuctionType!
}
type AuctionCancel @entity {
id: ID!
token: MonstaNFT!
timestamp: BigInt!
type: AuctionType!
}
type AuctionSucceed @entity{
id: ID!
token: MonstaNFT!
timestamp: BigInt!
totalPrice: BigInt!
winner: Bytes!
type: AuctionType!
}
type MonstaSpawn @entity{
id: ID!
token: MonstaNFT!
timestamp: BigInt!
owner: Bytes!
genes: BigInt!
matron: MonstaNFT
sire: MonstaNFT
}
type MonstaRebirth @entity{
id: ID!
token: MonstaNFT!
timestamp: BigInt!
genes: BigInt!
}
type MonstaRetire @entity {
id: ID!
token: MonstaNFT!
timestamp: BigInt!
}
type MonstaEvolve @entity{
id: ID!
token: MonstaNFT!
timestamp: BigInt!
oldGenes: BigInt
newGenes: BigInt
}
type Transfer @entity{
id: ID!
token: MonstaNFT!
timestamp: BigInt!
from: Bytes!
to: Bytes!
}