/
msgs.proto
241 lines (198 loc) · 7.42 KB
/
msgs.proto
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
syntax = "proto3";
package desmos.reports.v1;
import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";
import "desmos/reports/v1/models.proto";
option go_package = "github.com/desmos-labs/desmos/v7/x/reports/types";
// Msg defines the reports Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;
// CreateReport allows to create a new report
rpc CreateReport(MsgCreateReport) returns (MsgCreateReportResponse);
// DeleteReport allows to delete an existing report
rpc DeleteReport(MsgDeleteReport) returns (MsgDeleteReportResponse);
// SupportStandardReason allows to support one of the reasons present inside
// the module params
rpc SupportStandardReason(MsgSupportStandardReason)
returns (MsgSupportStandardReasonResponse);
// AddReason allows to add a new supported reporting reason
rpc AddReason(MsgAddReason) returns (MsgAddReasonResponse);
// RemoveReason allows to remove a supported reporting reason
rpc RemoveReason(MsgRemoveReason) returns (MsgRemoveReasonResponse);
// UpdateParams defines a (governance) operation for updating the module
// parameters.
// The authority defaults to the x/gov module account.
//
// Since: Desmos 5.0.0
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
}
// MsgCreateReport represents the message to be used to create a report
message MsgCreateReport {
option (cosmos.msg.v1.signer) = "reporter";
option (amino.name) = "desmos/MsgCreateReport";
// Id of the subspace for which the report should be stored
uint64 subspace_id = 1 [
(gogoproto.customname) = "SubspaceID",
(gogoproto.moretags) = "yaml:\"subspace_id\""
];
// Id of the reason this report has been created for
repeated uint32 reasons_ids = 2 [
(gogoproto.customname) = "ReasonsIDs",
(gogoproto.moretags) = "yaml:\"reasons_ids\"",
(amino.dont_omitempty) = true
];
// (optional) Message attached to this report
string message = 3 [ (gogoproto.moretags) = "yaml:\"message\"" ];
// Address of the reporter
string reporter = 4 [
(gogoproto.moretags) = "yaml:\"reporter\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
// Target of the report
google.protobuf.Any target = 5 [
(gogoproto.moretags) = "yaml:\"target\"",
(cosmos_proto.accepts_interface) = "desmos.reports.v1.ReportTarget"
];
}
// MsgCreateReportResponse represents the Msg/CreateReport response type
message MsgCreateReportResponse {
// Id of the newly created report
uint64 report_id = 1 [
(gogoproto.customname) = "ReportID",
(gogoproto.moretags) = "yaml:\"report_id\""
];
// Time in which the report was created
google.protobuf.Timestamp creation_date = 2 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"creation_date\"",
(amino.dont_omitempty) = true
];
}
// MsgDeleteReport represents the message to be used when deleting a report
message MsgDeleteReport {
option (cosmos.msg.v1.signer) = "signer";
option (amino.name) = "desmos/MsgDeleteReport";
// Id of the subspace that contains the report to be deleted
uint64 subspace_id = 1 [
(gogoproto.customname) = "SubspaceID",
(gogoproto.moretags) = "yaml:\"subspace_id\""
];
// Id of the report to be deleted
uint64 report_id = 2 [
(gogoproto.customname) = "ReportID",
(gogoproto.moretags) = "yaml:\"report_id\""
];
// Address of the user deleting the report
string signer = 3 [
(gogoproto.moretags) = "yaml:\"signer\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
}
// MsgDeleteReportResponse represents the Msg/DeleteReport response type
message MsgDeleteReportResponse {}
// MsgSupportStandardReason represents the message to be used when wanting to
// support one reason from the module params
message MsgSupportStandardReason {
option (cosmos.msg.v1.signer) = "signer";
option (amino.name) = "desmos/MsgSupportStandardReason";
// Id of the subspace for which to support the reason
uint64 subspace_id = 1 [
(gogoproto.customname) = "SubspaceID",
(gogoproto.moretags) = "yaml:\"subspace_id\""
];
// Id of the reason that should be supported
uint32 standard_reason_id = 2 [
(gogoproto.customname) = "StandardReasonID",
(gogoproto.moretags) = "yaml:\"standard_reason_id\""
];
// Address of the user signing the message
string signer = 3 [
(gogoproto.moretags) = "yaml:\"signer\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
}
// MsgSupportStandardReasonResponse represents the Msg/SupportStandardReason
// response type
message MsgSupportStandardReasonResponse {
// Id of the newly added reason
uint32 reasons_ids = 1 [
(gogoproto.customname) = "ReasonsID",
(gogoproto.moretags) = "yaml:\"reasons_ids\""
];
}
// MsgAddReason represents the message to be used when adding a new supported
// reason
message MsgAddReason {
option (cosmos.msg.v1.signer) = "signer";
option (amino.name) = "desmos/MsgAddReason";
// Id of the subspace for which to add the reason
uint64 subspace_id = 1 [
(gogoproto.customname) = "SubspaceID",
(gogoproto.moretags) = "yaml:\"subspace_id\""
];
// Title of the reason
string title = 2 [ (gogoproto.moretags) = "yaml:\"title\"" ];
// (optional) Extended description of the reason and the cases it applies to
string description = 3 [ (gogoproto.moretags) = "yaml:\"description\"" ];
// Address of the user adding the supported reason
string signer = 4 [
(gogoproto.moretags) = "yaml:\"signer\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
}
// MsgAddReasonResponse represents the Msg/AddReason response type
message MsgAddReasonResponse {
// Id of the newly supported reason
uint32 reason_id = 1 [
(gogoproto.customname) = "ReasonID",
(gogoproto.moretags) = "yaml:\"reason_id\""
];
}
// MsgRemoveReason represents the message to be used when removing an exiting
// reporting reason
message MsgRemoveReason {
option (cosmos.msg.v1.signer) = "signer";
option (amino.name) = "desmos/MsgRemoveReason";
// Id of the subspace from which to remove the reason
uint64 subspace_id = 1 [
(gogoproto.customname) = "SubspaceID",
(gogoproto.moretags) = "yaml:\"subspace_id\""
];
// Id of the reason to be deleted
uint32 reason_id = 2 [
(gogoproto.customname) = "ReasonID",
(gogoproto.moretags) = "yaml:\"reason_id\""
];
// Address of the user adding the supported reason
string signer = 3 [
(gogoproto.moretags) = "yaml:\"signer\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
}
// MsgRemoveReasonResponse represents the Msg/RemoveReason response type
message MsgRemoveReasonResponse {}
// MsgUpdateParams is the Msg/UpdateParams request type.
//
// Since: Desmos 5.0.0
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
option (amino.name) = "desmos/x/reports/MsgUpdateParams";
// authority is the address that controls the module (defaults to x/gov unless
// overwritten).
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// params defines the parameters to update.
//
// NOTE: All parameters must be supplied.
Params params = 2
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ];
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
//
// Since: Desmos 5.0.0
message MsgUpdateParamsResponse {}