-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
136 lines (120 loc) · 2.84 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
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
type Colony @entity {
id: ID! # <colonyAddress>
ensName: String
orbitAddress: String
colonyChainId: BigInt!
token: Token
domains: [Domain!]!
metadata: String
metadataHistory: [ColonyMetadata!]! @derivedFrom(field: "colony")
extensions: [ColonyExtension!] @derivedFrom(field: "colony")
}
type ColonyMetadata @entity {
id: ID! # <colonyAddress>_<transactionHash>_<logId>
colony: Colony!
transaction: Transaction!
metadata: String
}
type Domain @entity {
id: ID! # <colonyAddress>_domain_<domainId>
domainChainId: BigInt!
parent: Domain
name: String
colonyAddress: String
metadata: String
metadataHistory: [DomainMetadata!]! @derivedFrom(field: "domain")
skill: GlobalSkill
}
type DomainMetadata @entity {
id: ID! # colonyAddress_<domainId>_<transactionHash>_<logId>
domain: Domain!
transaction: Transaction!
metadata: String
}
type GlobalSkill @entity {
id: ID! # global_skill_<skillChainId>
skillChainId: BigInt!
parent: GlobalSkill
domainId: ID # domain id following the above listed domain id format
}
type Payment @entity {
id: ID!
domain: Domain
colony: Colony
to: String
fundingPot: FundingPot
paymentChainId: BigInt
}
type Expenditure @entity {
id: ID!
}
type OneTxPayment @entity {
id: ID! #<colonyAddress>_oneTxPayment_<noOfPayouts>_<PayoutId> (payout id is left zero padded to 18 chars)
domain: Domain
fundamentalChainId: BigInt
timestamp: BigInt
nPayouts: BigInt
agent: String
transaction: Transaction
expenditure: Expenditure
payment: Payment
}
type Token @entity {
id: ID!
decimals: BigInt
symbol: String
}
type FundingPot @entity {
id: ID!
fundingPotPayouts: [FundingPotPayout!]!
}
type FundingPotPayout @entity {
id: ID! # <colonyAddress>_fundingpot_<fundingPotId>_<tokenAddress>
token: Token
amount: BigInt
fundingPotChainId: BigInt
}
type Transaction @entity {
id: ID!
block: Block
}
type Block @entity {
id: ID!
timestamp: BigInt
}
type Event @entity {
id: ID! # <globalEventCount>_<txHash>_event_<logIndex> (event count is left zero padded to 18 chars)
domain: Domain
timestamp: BigInt
transaction: Transaction
address: String
associatedColony: Colony
name: String
args: String
}
type ColonyExtension @entity {
id: ID! # <extensionAddress>
colony: Colony!
hash: String!
}
type Motion @entity {
id: ID! # <colonyAddress>_motion_<extensionAddress>_<motionId> (motion id is left zero padded to 18 chars)
fundamentalChainId: BigInt
action: String
extensionAddress: String
associatedColony: Colony
transaction: Transaction
agent: String
domain: Domain
stakes: [BigInt!]
requiredStake: BigInt
escalated: Boolean
timestamp: BigInt
}
type CoinMachinePeriod @entity {
id: ID! # <colonyAddress>_coinMachine_<extensionAddress>_<saleEnd>
saleEndedAt: BigInt!
colonyAddress: String!
tokensBought: BigInt
price: BigInt
}