tx · 5PCnFypGYzFyQDDeSAKVcua3qAfnjdXBkx2BVVymKftH 3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ: -0.10000000 Waves 2020.11.30 20:18 [1288446] smart account 3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ > SELF 0.00000000 Waves
{ "type": 13, "id": "5PCnFypGYzFyQDDeSAKVcua3qAfnjdXBkx2BVVymKftH", "fee": 10000000, "feeAssetId": null, "timestamp": 1606756689125, "version": 2, "chainId": 84, "sender": "3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ", "senderPublicKey": "3Fjao2FW1JXSPd5EkP7C3uerW18HYacYsaMYALFMGA6N", "proofs": [ "En8qHsWU7reaVnDJD1Uq2F51bnHDWsn7gn82puUhcdSKeU2sTErGrLkA7GUZnnzV7HcjTmmyiQyw9x7MEe9sogB" ], "script": "base64:AAIDAAAAAAAAAFAIARIECgIICBIECgIICBIECgIIARIDCgEIEgUKAwgICBIFCgMICAESAwoBCBIECgIICBIECgIICBIDCgEIEgUKAwgIARIFCgMICAgSAwoBCAAAAAkAAAAABlFVT1JVTQAAAAAAAAAAAQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAAFAAAAA3ZhbAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAABQAAAAN2YWwAAAAADG1haW5Db250cmFjdAUAAAAEdGhpcwEAAAAHaXNPd25lcgAAAAEAAAAHYWRkcmVzcwMJAAA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19zdGF0dXMCAAAADXdvcmtfZmluaXNoZWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAABV9hcHBfBQAAABB3aW5uZXJJZGVudGlmaWVyAgAAAAhfcHJvY2VzcwIAAAAGd2lubmVyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19yZXBvcnQFAAAACnJlcG9ydExpbmsFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAC3RlYW1BZGRyZXNzBQAAAAxyZXdhcmRBbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAAFpAQAAAApyZWplY3RUYXNrAAAAAQAAAAZ0YXNrSWQDCQEAAAABIQAAAAEJAQAAAA1pc0dyb3VwTWVtYmVyAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAAgAAAAECAAAAIGdyYW50cyB3b3JraW5nIGdyb3VwIGFjY2VzcyBvbmx5BAAAAA50ZWFtSWRlbnRpZmllcgkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAApfcGVyZm9ybWVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19zdGF0dXMCAAAACHJlamVjdGVkBQAAAANuaWwAAAAA1JKFoA==", "height": 1288446, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AUewYi5WsC1EFqBAb4ywzF3ndZQGZgUfue828f85qKjQ Next: HR7iWwCxPc8HbX878WDmwLj9JY3RCAkJZTrcLwokNHFm Diff:
Old | New | Differences | |
---|---|---|---|
33 | 33 | ||
34 | 34 | let h = this | |
35 | 35 | ||
36 | - | func i (j) = (j == this) | |
36 | + | func i (j) = if ((j == this)) | |
37 | + | then true | |
38 | + | else (j == h) | |
37 | 39 | ||
38 | 40 | ||
39 | 41 | func k () = { | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | @Callable(p) | |
96 | - | func addTask (q,r) = WriteSet([DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_title"), q), DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_link"), r)]) | |
98 | + | func addTask (q,r) = if (!(m(p.caller))) | |
99 | + | then throw("grants working group access only") | |
100 | + | else WriteSet([DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_title"), q), DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_link"), r)]) | |
97 | 101 | ||
98 | 102 | ||
99 | 103 | ||
100 | 104 | @Callable(p) | |
101 | - | func addTaskDetails (s,t) = { | |
102 | - | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
103 | - | if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")))) | |
104 | - | then throw("team leader only") | |
105 | - | else WriteSet([DataEntry((("tasks_" + s) + "_requestedreward"), t)]) | |
106 | - | } | |
107 | - | ||
108 | - | ||
109 | - | ||
110 | - | @Callable(p) | |
111 | - | func initTaskVoting (s) = if (!(m(p.caller))) | |
105 | + | func addTaskDetails (s,t) = if (!(m(p.caller))) | |
112 | 106 | then throw("grants working group access only") | |
113 | - | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "voting_started")]) | |
107 | + | else { | |
108 | + | let u = extract(p.payment).amount | |
109 | + | WriteSet([DataEntry((("tasks_" + s) + "_reward"), u), DataEntry((("tasks_" + s) + "_details"), t), DataEntry((("tasks_" + s) + "_status"), "proposed")]) | |
110 | + | } | |
114 | 111 | ||
115 | 112 | ||
116 | 113 | ||
150 | 147 | let z = b(y) | |
151 | 148 | if ((z > 0)) | |
152 | 149 | then { | |
153 | - | let D = " | |
150 | + | let D = "ready_to_apply" | |
154 | 151 | WriteSet([DataEntry((("tasks_" + s) + "_status"), D)]) | |
155 | 152 | } | |
156 | 153 | else { | |
162 | 159 | ||
163 | 160 | ||
164 | 161 | @Callable(p) | |
165 | - | func startWork (s) = { | |
166 | - | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
167 | - | if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")))) | |
168 | - | then throw("team leader only") | |
169 | - | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_started")]) | |
162 | + | func applyForTask (s,E,r) = { | |
163 | + | let F = g((("tasks_" + s) + "_status")) | |
164 | + | if ((F != "ready_to_apply")) | |
165 | + | then throw("This grant has not yet been approved") | |
166 | + | else { | |
167 | + | let G = (("tasks_" + s) + "_applicants") | |
168 | + | let H = g(G) | |
169 | + | let I = drop(toString(p.caller), 10) | |
170 | + | let J = toString(p.caller) | |
171 | + | let K = ((H + ";") + J) | |
172 | + | WriteSet([DataEntry((((("tasks_" + s) + "_app_") + I) + "_name"), E), DataEntry((((("tasks_" + s) + "_app_") + I) + "_link"), r), DataEntry((((("tasks_" + s) + "_app_") + I) + "_leader"), J), DataEntry((((("tasks_" + s) + "_app_") + I) + "_id"), I), DataEntry(G, K)]) | |
173 | + | } | |
170 | 174 | } | |
175 | + | ||
176 | + | ||
177 | + | ||
178 | + | @Callable(p) | |
179 | + | func voteForApplicant (s,L,v) = if (!(o(p))) | |
180 | + | then throw("you can't vote") | |
181 | + | else { | |
182 | + | let M = (drop(toString(p.caller), 10) + drop(L, 10)) | |
183 | + | let w = ((("tasks_" + s) + "_vote_") + M) | |
184 | + | let N = b(w) | |
185 | + | if ((N != 0)) | |
186 | + | then throw("you have already voted on this team") | |
187 | + | else { | |
188 | + | let O = (((("tasks_" + s) + "_app_") + L) + "_votes") | |
189 | + | let P = (((("tasks_" + s) + "_app_") + L) + "_score") | |
190 | + | let Q = (1 + b(O)) | |
191 | + | let R = (v + b(P)) | |
192 | + | WriteSet([DataEntry(w, v), DataEntry(P, R)]) | |
193 | + | } | |
194 | + | } | |
195 | + | ||
196 | + | ||
197 | + | ||
198 | + | @Callable(p) | |
199 | + | func finishApplicantsVoting (s) = { | |
200 | + | let S = 1 | |
201 | + | if (!(m(p.caller))) | |
202 | + | then throw("grants working group access only") | |
203 | + | else { | |
204 | + | let T = g((("tasks_" + s) + "_applicants")) | |
205 | + | let U = split(T, ";") | |
206 | + | if ((size(U) == 0)) | |
207 | + | then throw("No one has applied to the hackathon, yet") | |
208 | + | else WriteSet([DataEntry((("tasks_" + s) + "_performer"), T), DataEntry((("tasks_" + s) + "_status"), "ready_to_submit")]) | |
209 | + | } | |
210 | + | } | |
211 | + | ||
212 | + | ||
213 | + | ||
214 | + | @Callable(p) | |
215 | + | func enableSubmissions (s,V) = if (!(m(p.caller))) | |
216 | + | then throw("grants working group access only") | |
217 | + | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_started"), DataEntry((("tasks_" + s) + "_jury"), V)]) | |
218 | + | ||
219 | + | ||
220 | + | ||
221 | + | @Callable(p) | |
222 | + | func submitSolution (s,W) = { | |
223 | + | func X (s) = (g((("tasks_" + s) + "_status")) == "work_started") | |
224 | + | ||
225 | + | let L = getStringValue(this, (("tasks_" + s) + "_performer")) | |
226 | + | if (!(X(s))) | |
227 | + | then throw("not possible to upload solution now") | |
228 | + | else if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + L) + "_leader")))) | |
229 | + | then throw("team leader only") | |
230 | + | else WriteSet([DataEntry((((("tasks_" + s) + "_app_") + L) + "_process"), "work_submitted"), DataEntry((((("tasks_" + s) + "_app_") + L) + "_solution"), W)]) | |
231 | + | } | |
232 | + | ||
233 | + | ||
234 | + | ||
235 | + | @Callable(p) | |
236 | + | func stopSubmissions (s) = if (!(m(p.caller))) | |
237 | + | then throw("grants working group access only") | |
238 | + | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_finished")]) | |
239 | + | ||
240 | + | ||
241 | + | ||
242 | + | @Callable(p) | |
243 | + | func voteForSolution (s,L,v) = { | |
244 | + | func Y (p,s) = true | |
245 | + | ||
246 | + | if (!(Y(p, s))) | |
247 | + | then throw("you can't vote") | |
248 | + | else { | |
249 | + | let M = (drop(toString(p.caller), 10) + drop(L, 10)) | |
250 | + | let w = ((("tasks_" + s) + "_solutionvote_") + M) | |
251 | + | let N = b(w) | |
252 | + | if ((N != 0)) | |
253 | + | then throw("you have already voted on this solution") | |
254 | + | else { | |
255 | + | let O = (((("tasks_" + s) + "_app_") + L) + "_solutionvotes") | |
256 | + | let P = (((("tasks_" + s) + "_app_") + L) + "_solutionscore") | |
257 | + | let Q = (1 + b(O)) | |
258 | + | let R = (v + b(P)) | |
259 | + | WriteSet([DataEntry(w, v), DataEntry(P, R)]) | |
260 | + | } | |
261 | + | } | |
262 | + | } | |
263 | + | ||
264 | + | ||
265 | + | ||
266 | + | @Callable(p) | |
267 | + | func acceptWorkResult (s,Z,aa) = if (!(m(p.caller))) | |
268 | + | then throw("grants working group access only") | |
269 | + | else { | |
270 | + | let ab = b((("tasks_" + s) + "_reward")) | |
271 | + | let ac = getStringValue(this, (((("tasks_" + s) + "_app_") + Z) + "_leader")) | |
272 | + | ScriptResult(WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_finished"), DataEntry((((("tasks_" + s) + "_app_") + Z) + "_process"), "winner"), DataEntry((("tasks_" + s) + "_report"), aa)]), TransferSet([ScriptTransfer(addressFromStringValue(ac), ab, unit)])) | |
273 | + | } | |
171 | 274 | ||
172 | 275 | ||
173 | 276 | ||
175 | 278 | func rejectTask (s) = if (!(m(p.caller))) | |
176 | 279 | then throw("grants working group access only") | |
177 | 280 | else { | |
178 | - | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
179 | - | WriteSet([DataEntry((("tasks_" + s) + "_status"), "rejected"), DataEntry((((("tasks_" + s) + "_app_") + u) + "_process"), "rejected")]) | |
180 | - | } | |
181 | - | ||
182 | - | ||
183 | - | ||
184 | - | @Callable(p) | |
185 | - | func acceptWorkResult (s,E) = if (!(m(p.caller))) | |
186 | - | then throw("grants working group access only") | |
187 | - | else { | |
188 | - | let F = b((("tasks_" + s) + "_reward")) | |
189 | - | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
190 | - | let G = getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")) | |
191 | - | ScriptResult(WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_finished"), DataEntry((((("tasks_" + s) + "_app_") + u) + "_report"), E)]), TransferSet([ScriptTransfer(addressFromStringValue(G), F, unit)])) | |
281 | + | let L = getStringValue(this, (("tasks_" + s) + "_performer")) | |
282 | + | WriteSet([DataEntry((("tasks_" + s) + "_status"), "rejected")]) | |
192 | 283 | } | |
193 | 284 | ||
194 | 285 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1 | |
5 | 5 | ||
6 | 6 | func b (c) = { | |
7 | 7 | let d = { | |
8 | 8 | let e = getInteger(this, c) | |
9 | 9 | if ($isInstanceOf(e, "Int")) | |
10 | 10 | then { | |
11 | 11 | let f = e | |
12 | 12 | f | |
13 | 13 | } | |
14 | 14 | else 0 | |
15 | 15 | } | |
16 | 16 | d | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func g (c) = { | |
21 | 21 | let d = { | |
22 | 22 | let e = getString(this, c) | |
23 | 23 | if ($isInstanceOf(e, "String")) | |
24 | 24 | then { | |
25 | 25 | let f = e | |
26 | 26 | f | |
27 | 27 | } | |
28 | 28 | else "" | |
29 | 29 | } | |
30 | 30 | d | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | let h = this | |
35 | 35 | ||
36 | - | func i (j) = (j == this) | |
36 | + | func i (j) = if ((j == this)) | |
37 | + | then true | |
38 | + | else (j == h) | |
37 | 39 | ||
38 | 40 | ||
39 | 41 | func k () = { | |
40 | 42 | let d = { | |
41 | 43 | let e = getString(h, "working_group_members") | |
42 | 44 | if ($isInstanceOf(e, "String")) | |
43 | 45 | then { | |
44 | 46 | let f = e | |
45 | 47 | f | |
46 | 48 | } | |
47 | 49 | else "" | |
48 | 50 | } | |
49 | 51 | d | |
50 | 52 | } | |
51 | 53 | ||
52 | 54 | ||
53 | 55 | func l () = { | |
54 | 56 | let d = { | |
55 | 57 | let e = getString(h, "dao_members") | |
56 | 58 | if ($isInstanceOf(e, "String")) | |
57 | 59 | then { | |
58 | 60 | let f = e | |
59 | 61 | f | |
60 | 62 | } | |
61 | 63 | else "" | |
62 | 64 | } | |
63 | 65 | d | |
64 | 66 | } | |
65 | 67 | ||
66 | 68 | ||
67 | 69 | func m (n) = { | |
68 | 70 | let d = { | |
69 | 71 | let e = getInteger(h, (("working_group_member_" + toString(n)) + "_weight")) | |
70 | 72 | if ($isInstanceOf(e, "Int")) | |
71 | 73 | then { | |
72 | 74 | let f = e | |
73 | 75 | f | |
74 | 76 | } | |
75 | 77 | else 0 | |
76 | 78 | } | |
77 | 79 | (d > 0) | |
78 | 80 | } | |
79 | 81 | ||
80 | 82 | ||
81 | 83 | func o (p) = { | |
82 | 84 | let d = { | |
83 | 85 | let e = getInteger(h, (("dao_member_" + toString(p.caller)) + "_weight")) | |
84 | 86 | if ($isInstanceOf(e, "Int")) | |
85 | 87 | then { | |
86 | 88 | let f = e | |
87 | 89 | f | |
88 | 90 | } | |
89 | 91 | else 0 | |
90 | 92 | } | |
91 | 93 | (d > 0) | |
92 | 94 | } | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | @Callable(p) | |
96 | - | func addTask (q,r) = WriteSet([DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_title"), q), DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_link"), r)]) | |
98 | + | func addTask (q,r) = if (!(m(p.caller))) | |
99 | + | then throw("grants working group access only") | |
100 | + | else WriteSet([DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_title"), q), DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_link"), r)]) | |
97 | 101 | ||
98 | 102 | ||
99 | 103 | ||
100 | 104 | @Callable(p) | |
101 | - | func addTaskDetails (s,t) = { | |
102 | - | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
103 | - | if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")))) | |
104 | - | then throw("team leader only") | |
105 | - | else WriteSet([DataEntry((("tasks_" + s) + "_requestedreward"), t)]) | |
106 | - | } | |
107 | - | ||
108 | - | ||
109 | - | ||
110 | - | @Callable(p) | |
111 | - | func initTaskVoting (s) = if (!(m(p.caller))) | |
105 | + | func addTaskDetails (s,t) = if (!(m(p.caller))) | |
112 | 106 | then throw("grants working group access only") | |
113 | - | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "voting_started")]) | |
107 | + | else { | |
108 | + | let u = extract(p.payment).amount | |
109 | + | WriteSet([DataEntry((("tasks_" + s) + "_reward"), u), DataEntry((("tasks_" + s) + "_details"), t), DataEntry((("tasks_" + s) + "_status"), "proposed")]) | |
110 | + | } | |
114 | 111 | ||
115 | 112 | ||
116 | 113 | ||
117 | 114 | @Callable(p) | |
118 | 115 | func voteForTaskProposal (s,v) = if (!(o(p))) | |
119 | 116 | then throw("you can't vote") | |
120 | 117 | else if ((getStringValue(this, (("tasks_" + s) + "_status")) != "proposed")) | |
121 | 118 | then throw("voting is closed or not started") | |
122 | 119 | else if (if ((v != -1)) | |
123 | 120 | then (v != 1) | |
124 | 121 | else false) | |
125 | 122 | then throw("you need to vote 1 or -1") | |
126 | 123 | else { | |
127 | 124 | let w = ((("tasks_" + s) + "_voted_") + toString(p.caller)) | |
128 | 125 | let x = b(w) | |
129 | 126 | if (!((x == 0))) | |
130 | 127 | then throw("you have already voted") | |
131 | 128 | else { | |
132 | 129 | let y = (("tasks_" + s) + "_voting_state") | |
133 | 130 | let z = b(y) | |
134 | 131 | let A = (("tasks_" + s) + "_voting_amount") | |
135 | 132 | let B = (b(y) + 1) | |
136 | 133 | let C = (z + v) | |
137 | 134 | ScriptResult(WriteSet([DataEntry(y, C), DataEntry(w, v), DataEntry(A, B)]), TransferSet([ScriptTransfer(p.caller, 500000, unit)])) | |
138 | 135 | } | |
139 | 136 | } | |
140 | 137 | ||
141 | 138 | ||
142 | 139 | ||
143 | 140 | @Callable(p) | |
144 | 141 | func finishTaskProposalVoting (s) = if ((a > ((b((("tasks_" + s) + "_voting_amount")) * 100) / b("dao_size")))) | |
145 | 142 | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
146 | 143 | else if (!(m(p.caller))) | |
147 | 144 | then throw("grants working group access only") | |
148 | 145 | else { | |
149 | 146 | let y = (("tasks_" + s) + "_voting_state") | |
150 | 147 | let z = b(y) | |
151 | 148 | if ((z > 0)) | |
152 | 149 | then { | |
153 | - | let D = " | |
150 | + | let D = "ready_to_apply" | |
154 | 151 | WriteSet([DataEntry((("tasks_" + s) + "_status"), D)]) | |
155 | 152 | } | |
156 | 153 | else { | |
157 | 154 | let D = "rejected" | |
158 | 155 | WriteSet([DataEntry((("tasks_" + s) + "_status"), D)]) | |
159 | 156 | } | |
160 | 157 | } | |
161 | 158 | ||
162 | 159 | ||
163 | 160 | ||
164 | 161 | @Callable(p) | |
165 | - | func startWork (s) = { | |
166 | - | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
167 | - | if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")))) | |
168 | - | then throw("team leader only") | |
169 | - | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_started")]) | |
162 | + | func applyForTask (s,E,r) = { | |
163 | + | let F = g((("tasks_" + s) + "_status")) | |
164 | + | if ((F != "ready_to_apply")) | |
165 | + | then throw("This grant has not yet been approved") | |
166 | + | else { | |
167 | + | let G = (("tasks_" + s) + "_applicants") | |
168 | + | let H = g(G) | |
169 | + | let I = drop(toString(p.caller), 10) | |
170 | + | let J = toString(p.caller) | |
171 | + | let K = ((H + ";") + J) | |
172 | + | WriteSet([DataEntry((((("tasks_" + s) + "_app_") + I) + "_name"), E), DataEntry((((("tasks_" + s) + "_app_") + I) + "_link"), r), DataEntry((((("tasks_" + s) + "_app_") + I) + "_leader"), J), DataEntry((((("tasks_" + s) + "_app_") + I) + "_id"), I), DataEntry(G, K)]) | |
173 | + | } | |
170 | 174 | } | |
175 | + | ||
176 | + | ||
177 | + | ||
178 | + | @Callable(p) | |
179 | + | func voteForApplicant (s,L,v) = if (!(o(p))) | |
180 | + | then throw("you can't vote") | |
181 | + | else { | |
182 | + | let M = (drop(toString(p.caller), 10) + drop(L, 10)) | |
183 | + | let w = ((("tasks_" + s) + "_vote_") + M) | |
184 | + | let N = b(w) | |
185 | + | if ((N != 0)) | |
186 | + | then throw("you have already voted on this team") | |
187 | + | else { | |
188 | + | let O = (((("tasks_" + s) + "_app_") + L) + "_votes") | |
189 | + | let P = (((("tasks_" + s) + "_app_") + L) + "_score") | |
190 | + | let Q = (1 + b(O)) | |
191 | + | let R = (v + b(P)) | |
192 | + | WriteSet([DataEntry(w, v), DataEntry(P, R)]) | |
193 | + | } | |
194 | + | } | |
195 | + | ||
196 | + | ||
197 | + | ||
198 | + | @Callable(p) | |
199 | + | func finishApplicantsVoting (s) = { | |
200 | + | let S = 1 | |
201 | + | if (!(m(p.caller))) | |
202 | + | then throw("grants working group access only") | |
203 | + | else { | |
204 | + | let T = g((("tasks_" + s) + "_applicants")) | |
205 | + | let U = split(T, ";") | |
206 | + | if ((size(U) == 0)) | |
207 | + | then throw("No one has applied to the hackathon, yet") | |
208 | + | else WriteSet([DataEntry((("tasks_" + s) + "_performer"), T), DataEntry((("tasks_" + s) + "_status"), "ready_to_submit")]) | |
209 | + | } | |
210 | + | } | |
211 | + | ||
212 | + | ||
213 | + | ||
214 | + | @Callable(p) | |
215 | + | func enableSubmissions (s,V) = if (!(m(p.caller))) | |
216 | + | then throw("grants working group access only") | |
217 | + | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_started"), DataEntry((("tasks_" + s) + "_jury"), V)]) | |
218 | + | ||
219 | + | ||
220 | + | ||
221 | + | @Callable(p) | |
222 | + | func submitSolution (s,W) = { | |
223 | + | func X (s) = (g((("tasks_" + s) + "_status")) == "work_started") | |
224 | + | ||
225 | + | let L = getStringValue(this, (("tasks_" + s) + "_performer")) | |
226 | + | if (!(X(s))) | |
227 | + | then throw("not possible to upload solution now") | |
228 | + | else if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + L) + "_leader")))) | |
229 | + | then throw("team leader only") | |
230 | + | else WriteSet([DataEntry((((("tasks_" + s) + "_app_") + L) + "_process"), "work_submitted"), DataEntry((((("tasks_" + s) + "_app_") + L) + "_solution"), W)]) | |
231 | + | } | |
232 | + | ||
233 | + | ||
234 | + | ||
235 | + | @Callable(p) | |
236 | + | func stopSubmissions (s) = if (!(m(p.caller))) | |
237 | + | then throw("grants working group access only") | |
238 | + | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_finished")]) | |
239 | + | ||
240 | + | ||
241 | + | ||
242 | + | @Callable(p) | |
243 | + | func voteForSolution (s,L,v) = { | |
244 | + | func Y (p,s) = true | |
245 | + | ||
246 | + | if (!(Y(p, s))) | |
247 | + | then throw("you can't vote") | |
248 | + | else { | |
249 | + | let M = (drop(toString(p.caller), 10) + drop(L, 10)) | |
250 | + | let w = ((("tasks_" + s) + "_solutionvote_") + M) | |
251 | + | let N = b(w) | |
252 | + | if ((N != 0)) | |
253 | + | then throw("you have already voted on this solution") | |
254 | + | else { | |
255 | + | let O = (((("tasks_" + s) + "_app_") + L) + "_solutionvotes") | |
256 | + | let P = (((("tasks_" + s) + "_app_") + L) + "_solutionscore") | |
257 | + | let Q = (1 + b(O)) | |
258 | + | let R = (v + b(P)) | |
259 | + | WriteSet([DataEntry(w, v), DataEntry(P, R)]) | |
260 | + | } | |
261 | + | } | |
262 | + | } | |
263 | + | ||
264 | + | ||
265 | + | ||
266 | + | @Callable(p) | |
267 | + | func acceptWorkResult (s,Z,aa) = if (!(m(p.caller))) | |
268 | + | then throw("grants working group access only") | |
269 | + | else { | |
270 | + | let ab = b((("tasks_" + s) + "_reward")) | |
271 | + | let ac = getStringValue(this, (((("tasks_" + s) + "_app_") + Z) + "_leader")) | |
272 | + | ScriptResult(WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_finished"), DataEntry((((("tasks_" + s) + "_app_") + Z) + "_process"), "winner"), DataEntry((("tasks_" + s) + "_report"), aa)]), TransferSet([ScriptTransfer(addressFromStringValue(ac), ab, unit)])) | |
273 | + | } | |
171 | 274 | ||
172 | 275 | ||
173 | 276 | ||
174 | 277 | @Callable(p) | |
175 | 278 | func rejectTask (s) = if (!(m(p.caller))) | |
176 | 279 | then throw("grants working group access only") | |
177 | 280 | else { | |
178 | - | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
179 | - | WriteSet([DataEntry((("tasks_" + s) + "_status"), "rejected"), DataEntry((((("tasks_" + s) + "_app_") + u) + "_process"), "rejected")]) | |
180 | - | } | |
181 | - | ||
182 | - | ||
183 | - | ||
184 | - | @Callable(p) | |
185 | - | func acceptWorkResult (s,E) = if (!(m(p.caller))) | |
186 | - | then throw("grants working group access only") | |
187 | - | else { | |
188 | - | let F = b((("tasks_" + s) + "_reward")) | |
189 | - | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
190 | - | let G = getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")) | |
191 | - | ScriptResult(WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_finished"), DataEntry((((("tasks_" + s) + "_app_") + u) + "_report"), E)]), TransferSet([ScriptTransfer(addressFromStringValue(G), F, unit)])) | |
281 | + | let L = getStringValue(this, (("tasks_" + s) + "_performer")) | |
282 | + | WriteSet([DataEntry((("tasks_" + s) + "_status"), "rejected")]) | |
192 | 283 | } | |
193 | 284 | ||
194 | 285 |
github/deemru/w8io/169f3d6 52.87 ms ◑