-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
110 lines (82 loc) · 1.8 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
# Squid Schema: Nation3 Arbitrator
# Version: 0.1.0
enum AgreementStatus {
Created
Ongoing
Finalized
Disputed
}
enum PositionStatus {
Joined
Finalized
Withdrawn
Disputed
}
type AgremeentInfo @entity {
id: ID!
agreement: Agreement!
agreementPosition: AgreementPosition!
dispute: Dispute
}
type Agreement @entity {
"Agreement ID"
id: ID!
"Hash of the detailed terms of the agreement"
termsHash: Bytes!
"Required amount to join or merkle root of (address,amount)"
criteria: BigInt!
"Agreement table join"
agreements: [AgremeentInfo!]! @derivedFrom(field: "agreement")
"Agreement Metadata URI"
metadataURI: String!
"Agreement token address"
token: Bytes!
"Status of the agreement"
status: AgreementStatus!
"Time of the agreement creation"
createdAt: BigInt!
}
type AgreementPosition @entity {
"Position ID"
id: ID!
"Holder of the position - address"
party: Bytes!
"Amount of tokens corresponding to this position"
balance: BigInt!
"Status of the agreement position"
status: PositionStatus!
"Positions of the agreement"
positions: [AgremeentInfo!]! @derivedFrom(field: "agreementPosition")
}
enum ResolutionStatus {
Submitted
Appealed
Endorsed
Executed
}
type Dispute @entity {
"Dispute id"
id: ID!
"Agreement in dispute"
agreement: Agreement
"Time of the dispute creation"
createdAt: BigInt!
"Resolution Id"
resolution: Bytes
"Last submitted settlement"
settlement: Settlement
"All settlements linked to a dispute"
settlements: [Settlement!] @derivedFrom(field: "dispute")
"All disputes linked to an agreement"
disputes: [AgremeentInfo] @derivedFrom(field: "dispute")
}
type Settlement @entity {
"Settlement ID"
id: ID!
"Disputed ID"
dispute: Dispute!
"Time of the submission"
submittedAt: BigInt!
"Resolution Status"
status: ResolutionStatus!
}