-
Notifications
You must be signed in to change notification settings - Fork 7
/
proposal.schema.json
151 lines (151 loc) · 3.96 KB
/
proposal.schema.json
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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://docs.mistswap.fi/governance",
"title": "MistSwap Proposal List",
"description": "Schema for list of proposals compatible with the MistSwap voting system",
"definitions": {
"Version": {
"type": "object",
"description": "The version of the list, used in change detection",
"examples": [
{
"major": 1,
"minor": 0,
"patch": 0
}
],
"additionalProperties": false,
"properties": {
"major": {
"type": "integer",
"description": "The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.",
"minimum": 0,
"examples": [
1,
2
]
},
"minor": {
"type": "integer",
"description": "The minor version of the list. Must be incremented when tokens are added to the list.",
"minimum": 0,
"examples": [
0,
1
]
},
"patch": {
"type": "integer",
"description": "The patch version of the list. Must be incremented for any changes to the list.",
"minimum": 0,
"examples": [
0,
1
]
}
},
"required": [
"major",
"minor",
"patch"
]
},
"ProposalInfo": {
"type": "object",
"description": "Metadata for a proposal",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "The a succinct title as displayed in the list",
"examples": [
"Should MistSwap change its color scheme to green?"
]
},
"content": {
"type": "string",
"description": "Markdown content of the proposal shown when fully expanded",
"examples": [
"This is longer form content which fully describes what is being proposed."
]
},
"strategy": {
"type": "string",
"description": "What type of strategy for voting should this proposal do?",
"enum": ["single-choice"],
"examples": [
"single-choice"
]
},
"options": {
"type": "array",
"description": "An array of options available for this proposal",
"items": {
"type": "string"
},
"maxItems": 10,
"examples": [
"YES",
"NO",
"April",
"May"
]
},
"snapshotBlock": {
"type": "string",
"description": "The block where this snapshot was taken",
"pattern": "^[0-9+\\-%/$.]+$",
"minLength": 1,
"maxLength": 12,
"examples": [
"2668859"
]
},
"endBlock": {
"type": "string",
"description": "The block where this proposals vote is finished",
"pattern": "^[0-9+\\-%/$.]+$",
"minLength": 1,
"maxLength": 12,
"examples": [
"2668859"
]
}
},
"required": [
"title",
"content",
"strategy",
"options",
"snapshotBlock",
"endBlock"
]
}
},
"type": "object",
"additionalProperties": false,
"properties": {
"timestamp": {
"type": "string",
"format": "date-time",
"description": "The timestamp of this list version; i.e. when this immutable version of the list was created"
},
"version": {
"$ref": "#/definitions/Version"
},
"proposals": {
"type": "object",
"description": "The list of proposals",
"patternProperties": {
"^[a-f0-9]{64}$": {
"$ref": "#/definitions/ProposalInfo"
}
}
}
},
"required": [
"timestamp",
"version",
"proposals"
]
}