tx · 5eteApA1NbRDfEdfDL7QCSmy2ARWbPNyxEF1XjcgHY8E 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA: -0.10000000 Waves 2020.12.27 05:55 [1326531] smart account 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA > SELF 0.00000000 Waves
{ "type": 13, "id": "5eteApA1NbRDfEdfDL7QCSmy2ARWbPNyxEF1XjcgHY8E", "fee": 10000000, "feeAssetId": null, "timestamp": 1609037783818, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "4h4arLdFGCQasDMH5pGewFQHe8aEjSynLLFRnp6YkJgWnHaZdmXirtqhJXCX8nbNxwt4jvjrddb1W8S8sn3JxyBy" ], "script": "base64:AAIDAAAAAAAAADsIARIECgIICBIDCgEIEgQKAggIEgMKAQgSBQoDCAgIEgUKAwgICBIDCgEIEgMKAQgSBAoCCAgSAwoBCAAAABQAAAAADG1haW5Db250cmFjdAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTXdSemkyQm1xWlpYV3JDR0N3Y1JRTHNuaWMyQW9kNnpoUwAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAA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F9wcm9jZXNzAgAAAA13b3JrX2ZpbmlzaGVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19yZXBvcnQFAAAACnJlcG9ydExpbmsFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAC3RlYW1BZGRyZXNzBQAAAAxyZXdhcmRBbW91bnQFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAABVjaGVja3MgYXJlIG5vdCBwYXNzZWQAAAABaQEAAAAKcmVqZWN0VGFzawAAAAEAAAAGdGFza0lkAwkBAAAADWlzR3JvdXBNZW1iZXIAAAABCAUAAAABaQAAAAZjYWxsZXIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3N0YXR1cwIAAAAIcmVqZWN0ZWQFAAAAA25pbAkAAAIAAAABAgAAACBncmFudHMgd29ya2luZyBncm91cCBhY2Nlc3Mgb25seQAAAAAU3U0t", "height": 1326531, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8VjJ6RfRX1FR5boUnU7DohQpGWgtXUaeQCLE1YShNoYr Next: 21am3aLM3SHgmN51wmfpBvLYRWCnEKGbpcGAX6huFtRy Diff:
Old | New | Differences | |
---|---|---|---|
162 | 162 | ||
163 | 163 | func B (j,u,C) = if (!(n(j))) | |
164 | 164 | then throw("grants working group access only") | |
165 | - | else if ((h((("tasks_" + u) + "_status")) != " | |
165 | + | else if ((h((("tasks_" + u) + "_status")) != "ready_to_apply")) | |
166 | 166 | then throw("winner is not define") | |
167 | 167 | else if ((size(C) == 0)) | |
168 | 168 | then throw("no one has yet responded to the grant") |
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 | 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 | 137 | func w (j,u) = if (!(n(j))) | |
138 | 138 | then throw("grants working group access only") | |
139 | 139 | else if ((h((("tasks_" + u) + "_status")) != "proposed")) | |
140 | 140 | then throw("voting is not active") | |
141 | 141 | else if ((b > ((c((("tasks_" + u) + "_voting_amount")) * 100) / m()))) | |
142 | 142 | then throw((("more than " + toString(b)) + "% members have to vote before finishing the voting")) | |
143 | 143 | else true | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func x (j,u,y) = if ((h((("tasks_" + u) + "_status")) != "ready_to_apply")) | |
147 | 147 | then throw("this grant has not yet been approved") | |
148 | 148 | else if ((h((((("tasks_" + u) + "_app_") + y) + "_leader")) == toString(j))) | |
149 | 149 | then throw("you are applied") | |
150 | 150 | else true | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func z (j,u,y) = { | |
154 | 154 | let A = (drop(toString(j), 10) + drop(y, 10)) | |
155 | 155 | if ((h((("tasks_" + u) + "_status")) != "ready_to_apply")) | |
156 | 156 | then throw("voting is not active") | |
157 | 157 | else if ((c(((("tasks_" + u) + "_vote_") + A)) != 0)) | |
158 | 158 | then throw("you have already voted on this team") | |
159 | 159 | else true | |
160 | 160 | } | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func B (j,u,C) = if (!(n(j))) | |
164 | 164 | then throw("grants working group access only") | |
165 | - | else if ((h((("tasks_" + u) + "_status")) != " | |
165 | + | else if ((h((("tasks_" + u) + "_status")) != "ready_to_apply")) | |
166 | 166 | then throw("winner is not define") | |
167 | 167 | else if ((size(C) == 0)) | |
168 | 168 | then throw("no one has yet responded to the grant") | |
169 | 169 | else true | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func D (j,u,y) = if ((h((("tasks_" + u) + "_status")) != "team_chosen")) | |
173 | 173 | then throw("winner is not define") | |
174 | 174 | else if ((toString(j) != h((((("tasks_" + u) + "_app_") + y) + "_leader")))) | |
175 | 175 | then throw("team leader only") | |
176 | 176 | else true | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func E (j,u) = if (!(n(j))) | |
180 | 180 | then throw("grants working group access only") | |
181 | 181 | else true | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | @Callable(F) | |
185 | 185 | func addTask (G,H) = if (s(F.caller)) | |
186 | 186 | then WriteSet([DataEntry((("tasks_" + toBase58String(F.transactionId)) + "_title"), G), DataEntry((("tasks_" + toBase58String(F.transactionId)) + "_link"), H)]) | |
187 | 187 | else throw("checks are not passed") | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | ||
191 | 191 | @Callable(F) | |
192 | 192 | func addReward (u) = if (t(F.caller, u)) | |
193 | 193 | then { | |
194 | 194 | let I = extract(F.payment).amount | |
195 | 195 | WriteSet([DataEntry((("tasks_" + u) + "_reward"), I), DataEntry((("tasks_" + u) + "_status"), "proposed")]) | |
196 | 196 | } | |
197 | 197 | else throw("checks are not passed") | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | ||
201 | 201 | @Callable(F) | |
202 | 202 | func voteForTaskProposal (u,J) = if (v(F.caller, u)) | |
203 | 203 | then { | |
204 | 204 | let K = ((("tasks_" + u) + "_voted_") + toString(F.caller)) | |
205 | 205 | let L = (("tasks_" + u) + "_voting_state") | |
206 | 206 | let M = c(L) | |
207 | 207 | let N = (("tasks_" + u) + "_voting_amount") | |
208 | 208 | let O = (c(L) + 1) | |
209 | 209 | let P = q(J) | |
210 | 210 | let Q = (M + P) | |
211 | 211 | WriteSet([DataEntry(L, Q), DataEntry(K, P), DataEntry(N, O)]) | |
212 | 212 | } | |
213 | 213 | else throw("checks are not passed") | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | ||
217 | 217 | @Callable(F) | |
218 | 218 | func finishTaskProposalVoting (u) = if (w(F.caller, u)) | |
219 | 219 | then { | |
220 | 220 | let L = (("tasks_" + u) + "_voting_state") | |
221 | 221 | WriteSet([DataEntry((("tasks_" + u) + "_status"), if ((c(L) > 0)) | |
222 | 222 | then "ready_to_apply" | |
223 | 223 | else "rejected")]) | |
224 | 224 | } | |
225 | 225 | else throw("checks are not passed") | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | ||
229 | 229 | @Callable(F) | |
230 | 230 | func applyForTask (u,R,H) = { | |
231 | 231 | let y = drop(toString(F.caller), 10) | |
232 | 232 | if (x(F.caller, u, y)) | |
233 | 233 | then { | |
234 | 234 | let S = (("tasks_" + u) + "_applicants") | |
235 | 235 | let T = h(S) | |
236 | 236 | let U = ((T + ";") + toString(F.caller)) | |
237 | 237 | WriteSet([DataEntry((((("tasks_" + u) + "_app_") + y) + "_name"), R), DataEntry((((("tasks_" + u) + "_app_") + y) + "_link"), H), DataEntry((((("tasks_" + u) + "_app_") + y) + "_leader"), toString(F.caller)), DataEntry((((("tasks_" + u) + "_app_") + y) + "_id"), y), DataEntry(S, U)]) | |
238 | 238 | } | |
239 | 239 | else throw("checks are not passed") | |
240 | 240 | } | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | ||
244 | 244 | @Callable(F) | |
245 | 245 | func voteForApplicant (u,y,J) = if (z(F.caller, u, y)) | |
246 | 246 | then { | |
247 | 247 | let S = (((("tasks_" + u) + "_app_") + y) + "_voted") | |
248 | 248 | let U = ((h(S) + ";") + toString(F.caller)) | |
249 | 249 | let A = (drop(toString(F.caller), 20) + y) | |
250 | 250 | let K = ((("tasks_" + u) + "_vh_") + A) | |
251 | 251 | if ((h(K) == toString(F.caller))) | |
252 | 252 | then throw("you have already voted on this team") | |
253 | 253 | else { | |
254 | 254 | let V = (((("tasks_" + u) + "_app_") + y) + "_votes") | |
255 | 255 | let W = (((("tasks_" + u) + "_app_") + y) + "_score") | |
256 | 256 | let X = (1 + c(V)) | |
257 | 257 | let Y = (q(J) + c(W)) | |
258 | 258 | WriteSet([DataEntry(S, U), DataEntry(K, toString(F.caller)), DataEntry(V, X), DataEntry(W, Y)]) | |
259 | 259 | } | |
260 | 260 | } | |
261 | 261 | else throw("checks are not passed") | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | ||
265 | 265 | @Callable(F) | |
266 | 266 | func finishApplicantsVoting (u) = { | |
267 | 267 | func Z (aa,ab) = { | |
268 | 268 | let S = (("tasks_" + u) + "_applicants") | |
269 | 269 | let C = split(getStringValue(this, S), ";") | |
270 | 270 | let y = C[aa] | |
271 | 271 | let V = (((("tasks_" + u) + "_app_") + y) + "_votes") | |
272 | 272 | let X = c(V) | |
273 | 273 | let ac = C[ab] | |
274 | 274 | let ad = (((("tasks_" + u) + "_app_") + ac) + "_votes") | |
275 | 275 | let ae = c(ad) | |
276 | 276 | if ((X > ae)) | |
277 | 277 | then aa | |
278 | 278 | else ab | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | let af = h((("tasks_" + u) + "_applicants")) | |
282 | 282 | let C = split(af, ";") | |
283 | 283 | if (B(F.caller, u, C)) | |
284 | 284 | then { | |
285 | 285 | let ag = { | |
286 | 286 | let ah = [0, 1] | |
287 | 287 | let ai = size(ah) | |
288 | 288 | let aj = 0 | |
289 | 289 | if ((ai == 0)) | |
290 | 290 | then aj | |
291 | 291 | else { | |
292 | 292 | let ak = Z(aj, ah[0]) | |
293 | 293 | if ((ai == 1)) | |
294 | 294 | then ak | |
295 | 295 | else { | |
296 | 296 | let al = Z(ak, ah[1]) | |
297 | 297 | if ((ai == 2)) | |
298 | 298 | then al | |
299 | 299 | else { | |
300 | 300 | let am = Z(al, ah[2]) | |
301 | 301 | throw("List size exceed 2") | |
302 | 302 | } | |
303 | 303 | } | |
304 | 304 | } | |
305 | 305 | } | |
306 | 306 | let y = drop(C[ag], 20) | |
307 | 307 | WriteSet([DataEntry((("tasks_" + u) + "_status"), "team_chosen"), DataEntry((("tasks_" + u) + "_performer"), y), DataEntry((((("tasks_" + u) + "_app_") + y) + "_process"), "can_begin")]) | |
308 | 308 | } | |
309 | 309 | else throw("checks are not passed") | |
310 | 310 | } | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | ||
314 | 314 | @Callable(F) | |
315 | 315 | func startWork (u) = { | |
316 | 316 | let y = h((("tasks_" + u) + "_performer")) | |
317 | 317 | if (D(F.caller, u, y)) | |
318 | 318 | then WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_started"), DataEntry((((("tasks_" + u) + "_app_") + y) + "_process"), "work_started")]) | |
319 | 319 | else throw("checks are not passed") | |
320 | 320 | } | |
321 | 321 | ||
322 | 322 | ||
323 | 323 | ||
324 | 324 | @Callable(F) | |
325 | 325 | func acceptWorkResult (u,an) = if (E(F.caller, u)) | |
326 | 326 | then { | |
327 | 327 | let ao = c((("tasks_" + u) + "_reward")) | |
328 | 328 | let y = h((("tasks_" + u) + "_performer")) | |
329 | 329 | let ap = h((((("tasks_" + u) + "_app_") + y) + "_leader")) | |
330 | 330 | ScriptResult(WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_finished"), DataEntry((((("tasks_" + u) + "_app_") + y) + "_process"), "work_finished"), DataEntry((("tasks_" + u) + "_report"), an)]), TransferSet([ScriptTransfer(addressFromStringValue(ap), ao, unit)])) | |
331 | 331 | } | |
332 | 332 | else throw("checks are not passed") | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | ||
336 | 336 | @Callable(F) | |
337 | 337 | func rejectTask (u) = if (n(F.caller)) | |
338 | 338 | then WriteSet([DataEntry((("tasks_" + u) + "_status"), "rejected")]) | |
339 | 339 | else throw("grants working group access only") | |
340 | 340 | ||
341 | 341 |
github/deemru/w8io/026f985 48.68 ms ◑