tx · 3nLDNf2qUeo4VoExQKXLEE8KuQq254oPUWk4V15KN5bg

3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA:  -0.10000000 Waves

2020.12.28 04:13 [1327865] smart account 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA > SELF 0.00000000 Waves

{ "type": 13, "id": "3nLDNf2qUeo4VoExQKXLEE8KuQq254oPUWk4V15KN5bg", "fee": 10000000, "feeAssetId": null, "timestamp": 1609118027103, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "27JdEt6wcjsiyz2w24Am3FerCmzNeHVtfWk4aoFR8zibc7Vqa4hty1aQHM1ENDeEppK4zT2mVSZcJXQex6YvRTfR" ], "script": "base64:AAIDAAAAAAAAADsIARIECgIICBIDCgEIEgQKAggIEgMKAQgSBQoDCAgIEgUKAwgICBIDCgEIEgMKAQgSBAoCCAgSAwoBCAAAABQAAAAADG1haW5Db250cmFjdAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTXdSemkyQm1xWlpYV3JDR0N3Y1JRTHNuaWMyQW9kNnpoUwAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckb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lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAADnRlYW1JZGVudGlmaWVyAgAAAAhfcHJvY2VzcwIAAAANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfcmVwb3J0BQAAAApyZXBvcnRMaW5rBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAVY2hlY2tzIGFyZSBub3QgcGFzc2VkAAAAAWkBAAAACnJlamVjdFRhc2sAAAABAAAABnRhc2tJZAMJAQAAAA1pc0dyb3VwTWVtYmVyAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19zdGF0dXMCAAAACHJlamVjdGVkBQAAAANuaWwJAAACAAAAAQIAAAAgZ3JhbnRzIHdvcmtpbmcgZ3JvdXAgYWNjZXNzIG9ubHkAAAAADYOAMg==", "height": 1327865, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DzZTpyVyuCod1HZcAbSwS4B5XHGJb8LzP8cpDidM7P6w Next: GYsixwkFNZww7a3Se1Y8iADGjUDTMCaATxB7GjshyQBA Diff:
OldNewDifferences
154154 let A = (drop(toString(j), 10) + drop(y, 10))
155155 if (!(p(j)))
156156 then throw("you can't vote")
157- else if ((c(((("tasks_" + u) + "_vote_") + A)) != 0))
158- then throw("you have already voted on this team")
159- else true
157+ else if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
158+ then throw("voting is not active")
159+ else if ((c(((("tasks_" + u) + "_vote_") + A)) != 0))
160+ then throw("you have already voted on this team")
161+ else true
160162 }
161163
162164
163165 func B (j,u,C) = if (!(n(j)))
164166 then throw("grants working group access only")
165- else if ((size(C) == 0))
166- then throw("no one has yet responded to the grant")
167- else true
167+ else if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
168+ then throw("voting is not active")
169+ else if ((size(C) == 0))
170+ then throw("no one has yet responded to the grant")
171+ else true
168172
169173
170174 func D (j,u,y) = if ((h((("tasks_" + u) + "_status")) != "team_chosen"))
265269 func Z (aa,ab) = {
266270 let S = (("tasks_" + u) + "_applicants")
267271 let C = split(getStringValue(this, S), ";")
268- let y = C[aa]
269- let V = (((("tasks_" + u) + "_app_") + y) + "_votes")
270- let X = c(V)
271- let ac = C[ab]
272- let ad = (((("tasks_" + u) + "_app_") + ac) + "_votes")
273- let ae = c(ad)
274- if ((X > ae))
272+ let y = drop(C[aa], 10)
273+ let ac = (((("tasks_" + u) + "_app_") + y) + "_score")
274+ let ad = c(ac)
275+ let ae = drop(C[ab], 10)
276+ let af = (((("tasks_" + u) + "_app_") + ae) + "_score")
277+ let ag = c(af)
278+ if ((ad > ag))
275279 then aa
276280 else ab
277281 }
278282
279- let af = h((("tasks_" + u) + "_applicants"))
280- let C = split(af, ";")
283+ let ah = h((("tasks_" + u) + "_applicants"))
284+ let C = split(ah, ";")
281285 if (B(F.caller, u, C))
282286 then {
283- let ag = {
284- let ah = [0, 1]
285- let ai = size(ah)
286- let aj = 0
287- if ((ai == 0))
288- then aj
287+ let ai = {
288+ let aj = [0, 1]
289+ let ak = size(aj)
290+ let al = 0
291+ if ((ak == 0))
292+ then al
289293 else {
290- let ak = Z(aj, ah[0])
291- if ((ai == 1))
292- then ak
294+ let am = Z(al, aj[0])
295+ if ((ak == 1))
296+ then am
293297 else {
294- let al = Z(ak, ah[1])
295- if ((ai == 2))
296- then al
298+ let an = Z(am, aj[1])
299+ if ((ak == 2))
300+ then an
297301 else {
298- let am = Z(al, ah[2])
302+ let ao = Z(an, aj[2])
299303 throw("List size exceed 2")
300304 }
301305 }
302306 }
303307 }
304- let y = drop(C[ag], 10)
308+ let y = drop(C[ai], 10)
305309 WriteSet([DataEntry((("tasks_" + u) + "_status"), "team_chosen"), DataEntry((("tasks_" + u) + "_performer"), y), DataEntry((((("tasks_" + u) + "_app_") + y) + "_process"), "can_begin")])
306310 }
307311 else throw("checks are not passed")
320324
321325
322326 @Callable(F)
323-func acceptWorkResult (u,an) = if (E(F.caller, u))
327+func acceptWorkResult (u,ap) = if (E(F.caller, u))
324328 then {
325- let ao = c((("tasks_" + u) + "_reward"))
329+ let aq = c((("tasks_" + u) + "_reward"))
326330 let y = h((("tasks_" + u) + "_performer"))
327- let ap = h((((("tasks_" + u) + "_app_") + y) + "_leader"))
328- 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+ let ar = h((((("tasks_" + u) + "_app_") + y) + "_leader"))
332+ ScriptResult(WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_finished"), DataEntry((((("tasks_" + u) + "_app_") + y) + "_process"), "work_finished"), DataEntry((("tasks_" + u) + "_report"), ap)]), TransferSet([ScriptTransfer(addressFromStringValue(ar), aq, unit)]))
329333 }
330334 else throw("checks are not passed")
331335
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = addressFromStringValue("3MwRzi2BmqZZXWrCGCwcRQLsnic2Aod6zhS")
55
66 let b = 1
77
88 func c (d) = {
99 let e = {
1010 let f = getInteger(this, d)
1111 if ($isInstanceOf(f, "Int"))
1212 then {
1313 let g = f
1414 g
1515 }
1616 else 0
1717 }
1818 e
1919 }
2020
2121
2222 func h (d) = {
2323 let e = {
2424 let f = getString(this, d)
2525 if ($isInstanceOf(f, "String"))
2626 then {
2727 let g = f
2828 g
2929 }
3030 else ""
3131 }
3232 e
3333 }
3434
3535
3636 func i (j) = (j == this)
3737
3838
3939 func k () = {
4040 let e = {
4141 let f = getString(a, "working_group_members")
4242 if ($isInstanceOf(f, "String"))
4343 then {
4444 let g = f
4545 g
4646 }
4747 else ""
4848 }
4949 e
5050 }
5151
5252
5353 func l () = {
5454 let e = {
5555 let f = getString(a, "dao_members")
5656 if ($isInstanceOf(f, "String"))
5757 then {
5858 let g = f
5959 g
6060 }
6161 else ""
6262 }
6363 e
6464 }
6565
6666
6767 func m () = {
6868 let e = {
6969 let f = getInteger(a, "dao_size")
7070 if ($isInstanceOf(f, "Int"))
7171 then {
7272 let g = f
7373 g
7474 }
7575 else 0
7676 }
7777 e
7878 }
7979
8080
8181 func n (o) = {
8282 let e = {
8383 let f = getInteger(a, (("working_group_member_" + toString(o)) + "_weight"))
8484 if ($isInstanceOf(f, "Int"))
8585 then {
8686 let g = f
8787 g
8888 }
8989 else 0
9090 }
9191 (e > 0)
9292 }
9393
9494
9595 func p (j) = {
9696 let e = {
9797 let f = getInteger(a, (("dao_member_" + toString(j)) + "_weight"))
9898 if ($isInstanceOf(f, "Int"))
9999 then {
100100 let g = f
101101 g
102102 }
103103 else 0
104104 }
105105 (e > 0)
106106 }
107107
108108
109109 func q (r) = if ((r == "like"))
110110 then 1
111111 else if ((r == "dislike"))
112112 then -1
113113 else throw("you need to vote with 'like' or 'dislike' value")
114114
115115
116116 func s (j) = if (!(n(j)))
117117 then throw("grants working group access only")
118118 else true
119119
120120
121121 func t (j,u) = if (!(n(j)))
122122 then throw("grants working group access only")
123123 else if ((h((("tasks_" + u) + "_status")) != ""))
124124 then throw("grant isn`t new")
125125 else true
126126
127127
128128 func v (j,u) = if (!(p(j)))
129129 then throw("you can't vote")
130130 else if ((h((("tasks_" + u) + "_status")) != "proposed"))
131131 then throw("voting is closed or not started")
132132 else if ((c(((("tasks_" + u) + "_voted_") + toString(j))) != 0))
133133 then throw("you have already voted")
134134 else true
135135
136136
137137 func w (j,u) = if (!(n(j)))
138138 then throw("grants working group access only")
139139 else if ((h((("tasks_" + u) + "_status")) != "proposed"))
140140 then throw("voting is not active")
141141 else if ((b > ((c((("tasks_" + u) + "_voting_amount")) * 100) / m())))
142142 then throw((("more than " + toString(b)) + "% members have to vote before finishing the voting"))
143143 else true
144144
145145
146146 func x (j,u,y) = if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
147147 then throw("this grant has not yet been approved")
148148 else if ((h((((("tasks_" + u) + "_app_") + y) + "_leader")) == toString(j)))
149149 then throw("you are applied")
150150 else true
151151
152152
153153 func z (j,u,y) = {
154154 let A = (drop(toString(j), 10) + drop(y, 10))
155155 if (!(p(j)))
156156 then throw("you can't vote")
157- else if ((c(((("tasks_" + u) + "_vote_") + A)) != 0))
158- then throw("you have already voted on this team")
159- else true
157+ else if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
158+ then throw("voting is not active")
159+ else if ((c(((("tasks_" + u) + "_vote_") + A)) != 0))
160+ then throw("you have already voted on this team")
161+ else true
160162 }
161163
162164
163165 func B (j,u,C) = if (!(n(j)))
164166 then throw("grants working group access only")
165- else if ((size(C) == 0))
166- then throw("no one has yet responded to the grant")
167- else true
167+ else if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
168+ then throw("voting is not active")
169+ else if ((size(C) == 0))
170+ then throw("no one has yet responded to the grant")
171+ else true
168172
169173
170174 func D (j,u,y) = if ((h((("tasks_" + u) + "_status")) != "team_chosen"))
171175 then throw("winner is not define")
172176 else if ((toString(j) != h((((("tasks_" + u) + "_app_") + y) + "_leader"))))
173177 then throw("team leader only")
174178 else true
175179
176180
177181 func E (j,u) = if (!(n(j)))
178182 then throw("grants working group access only")
179183 else true
180184
181185
182186 @Callable(F)
183187 func addTask (G,H) = if (s(F.caller))
184188 then WriteSet([DataEntry((("tasks_" + toBase58String(F.transactionId)) + "_title"), G), DataEntry((("tasks_" + toBase58String(F.transactionId)) + "_link"), H)])
185189 else throw("checks are not passed")
186190
187191
188192
189193 @Callable(F)
190194 func addReward (u) = if (t(F.caller, u))
191195 then {
192196 let I = extract(F.payment).amount
193197 WriteSet([DataEntry((("tasks_" + u) + "_reward"), I), DataEntry((("tasks_" + u) + "_status"), "proposed")])
194198 }
195199 else throw("checks are not passed")
196200
197201
198202
199203 @Callable(F)
200204 func voteForTaskProposal (u,J) = if (v(F.caller, u))
201205 then {
202206 let K = ((("tasks_" + u) + "_voted_") + toString(F.caller))
203207 let L = (("tasks_" + u) + "_voting_state")
204208 let M = c(L)
205209 let N = (("tasks_" + u) + "_voting_amount")
206210 let O = (c(L) + 1)
207211 let P = q(J)
208212 let Q = (M + P)
209213 WriteSet([DataEntry(L, Q), DataEntry(K, P), DataEntry(N, O)])
210214 }
211215 else throw("checks are not passed")
212216
213217
214218
215219 @Callable(F)
216220 func finishTaskProposalVoting (u) = if (w(F.caller, u))
217221 then {
218222 let L = (("tasks_" + u) + "_voting_state")
219223 WriteSet([DataEntry((("tasks_" + u) + "_status"), if ((c(L) > 0))
220224 then "ready_to_apply"
221225 else "rejected")])
222226 }
223227 else throw("checks are not passed")
224228
225229
226230
227231 @Callable(F)
228232 func applyForTask (u,R,H) = {
229233 let y = drop(toString(F.caller), 10)
230234 if (x(F.caller, u, y))
231235 then {
232236 let S = (("tasks_" + u) + "_applicants")
233237 let T = h(S)
234238 let U = ((T + ";") + toString(F.caller))
235239 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)])
236240 }
237241 else throw("checks are not passed")
238242 }
239243
240244
241245
242246 @Callable(F)
243247 func voteForApplicant (u,y,J) = if (z(F.caller, u, y))
244248 then {
245249 let S = (((("tasks_" + u) + "_app_") + y) + "_voted")
246250 let U = ((h(S) + ";") + toString(F.caller))
247251 let A = (drop(toString(F.caller), 20) + y)
248252 let K = ((("tasks_" + u) + "_vh_") + A)
249253 if ((h(K) == toString(F.caller)))
250254 then throw("you have already voted on this team")
251255 else {
252256 let V = (((("tasks_" + u) + "_app_") + y) + "_votes")
253257 let W = (((("tasks_" + u) + "_app_") + y) + "_score")
254258 let X = (1 + c(V))
255259 let Y = (q(J) + c(W))
256260 WriteSet([DataEntry(S, U), DataEntry(K, toString(F.caller)), DataEntry(V, X), DataEntry(W, Y)])
257261 }
258262 }
259263 else throw("checks are not passed")
260264
261265
262266
263267 @Callable(F)
264268 func finishApplicantsVoting (u) = {
265269 func Z (aa,ab) = {
266270 let S = (("tasks_" + u) + "_applicants")
267271 let C = split(getStringValue(this, S), ";")
268- let y = C[aa]
269- let V = (((("tasks_" + u) + "_app_") + y) + "_votes")
270- let X = c(V)
271- let ac = C[ab]
272- let ad = (((("tasks_" + u) + "_app_") + ac) + "_votes")
273- let ae = c(ad)
274- if ((X > ae))
272+ let y = drop(C[aa], 10)
273+ let ac = (((("tasks_" + u) + "_app_") + y) + "_score")
274+ let ad = c(ac)
275+ let ae = drop(C[ab], 10)
276+ let af = (((("tasks_" + u) + "_app_") + ae) + "_score")
277+ let ag = c(af)
278+ if ((ad > ag))
275279 then aa
276280 else ab
277281 }
278282
279- let af = h((("tasks_" + u) + "_applicants"))
280- let C = split(af, ";")
283+ let ah = h((("tasks_" + u) + "_applicants"))
284+ let C = split(ah, ";")
281285 if (B(F.caller, u, C))
282286 then {
283- let ag = {
284- let ah = [0, 1]
285- let ai = size(ah)
286- let aj = 0
287- if ((ai == 0))
288- then aj
287+ let ai = {
288+ let aj = [0, 1]
289+ let ak = size(aj)
290+ let al = 0
291+ if ((ak == 0))
292+ then al
289293 else {
290- let ak = Z(aj, ah[0])
291- if ((ai == 1))
292- then ak
294+ let am = Z(al, aj[0])
295+ if ((ak == 1))
296+ then am
293297 else {
294- let al = Z(ak, ah[1])
295- if ((ai == 2))
296- then al
298+ let an = Z(am, aj[1])
299+ if ((ak == 2))
300+ then an
297301 else {
298- let am = Z(al, ah[2])
302+ let ao = Z(an, aj[2])
299303 throw("List size exceed 2")
300304 }
301305 }
302306 }
303307 }
304- let y = drop(C[ag], 10)
308+ let y = drop(C[ai], 10)
305309 WriteSet([DataEntry((("tasks_" + u) + "_status"), "team_chosen"), DataEntry((("tasks_" + u) + "_performer"), y), DataEntry((((("tasks_" + u) + "_app_") + y) + "_process"), "can_begin")])
306310 }
307311 else throw("checks are not passed")
308312 }
309313
310314
311315
312316 @Callable(F)
313317 func startWork (u) = {
314318 let y = h((("tasks_" + u) + "_performer"))
315319 if (D(F.caller, u, y))
316320 then WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_started"), DataEntry((((("tasks_" + u) + "_app_") + y) + "_process"), "work_started")])
317321 else throw("checks are not passed")
318322 }
319323
320324
321325
322326 @Callable(F)
323-func acceptWorkResult (u,an) = if (E(F.caller, u))
327+func acceptWorkResult (u,ap) = if (E(F.caller, u))
324328 then {
325- let ao = c((("tasks_" + u) + "_reward"))
329+ let aq = c((("tasks_" + u) + "_reward"))
326330 let y = h((("tasks_" + u) + "_performer"))
327- let ap = h((((("tasks_" + u) + "_app_") + y) + "_leader"))
328- 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+ let ar = h((((("tasks_" + u) + "_app_") + y) + "_leader"))
332+ ScriptResult(WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_finished"), DataEntry((((("tasks_" + u) + "_app_") + y) + "_process"), "work_finished"), DataEntry((("tasks_" + u) + "_report"), ap)]), TransferSet([ScriptTransfer(addressFromStringValue(ar), aq, unit)]))
329333 }
330334 else throw("checks are not passed")
331335
332336
333337
334338 @Callable(F)
335339 func rejectTask (u) = if (n(F.caller))
336340 then WriteSet([DataEntry((("tasks_" + u) + "_status"), "rejected")])
337341 else throw("grants working group access only")
338342
339343

github/deemru/w8io/026f985 
60.87 ms