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