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