tx · 4t81rRMPYwLV9VJqLnhf49nAEbfrMp5Kcu2ma9FUUWN1

3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA:  -0.10000000 Waves

2020.12.25 15:14 [1324206] smart account 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA > SELF 0.00000000 Waves

{ "type": 13, "id": "4t81rRMPYwLV9VJqLnhf49nAEbfrMp5Kcu2ma9FUUWN1", "fee": 10000000, "feeAssetId": null, "timestamp": 1608898538612, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "HPUim5H4VkbVNC1ftvswGtrsBhoWvd6gE1F9TqPKPP3ePe5y8YUk6UeXTVmoRPzU1cxuY5VvJVYjsfDGbBnnSbz" ], "script": "base64:AAIDAAAAAAAAADsIARIECgIICBIDCgEIEgQKAggIEgMKAQgSBQoDCAgIEgUKAwgICBIDCgEIEgMKAQgSBAoCCAgSAwoBCAAAAA4AAAAADG1haW5Db250cmFjdAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTXdSemkyQm1xWlpYV3JDR0N3Y1JRTHNuaWMyQW9kNnpoUwAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAA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VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3N0YXR1cwIAAAANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAADnRlYW1JZGVudGlmaWVyAgAAAAhfcHJvY2VzcwIAAAANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfcmVwb3J0BQAAAApyZXBvcnRMaW5rBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAABaQEAAAAKcmVqZWN0VGFzawAAAAEAAAAGdGFza0lkAwkBAAAAASEAAAABCQEAAAANaXNHcm91cE1lbWJlcgAAAAEIBQAAAAFpAAAABmNhbGxlcgkAAAIAAAABAgAAACBncmFudHMgd29ya2luZyBncm91cCBhY2Nlc3Mgb25seQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfc3RhdHVzAgAAAAhyZWplY3RlZAUAAAADbmlsAAAAAK5nkFA=", "height": 1324206, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JBdTBC39pTrjmWb4Zkt735KfDCRZpc2GTTftVgWL7xLK Next: 6GFQRCNVFcpDhrPJzHMeqirYZba3m4Ht7LoR3N3A4ted Diff:
OldNewDifferences
9292 }
9393
9494
95-func p (q) = {
95+func p (j) = {
9696 let e = {
97- let f = getInteger(a, (("dao_member_" + toString(q.caller)) + "_weight"))
97+ let f = getInteger(a, (("dao_member_" + toString(j)) + "_weight"))
9898 if ($isInstanceOf(f, "Int"))
9999 then {
100100 let g = f
106106 }
107107
108108
109-func r (s) = if ((s == "like"))
109+func q (r) = if ((r == "like"))
110110 then 1
111- else if ((s == "dislike"))
111+ else if ((r == "dislike"))
112112 then -1
113113 else throw("you need to vote with 'like' or 'dislike' value")
114114
115115
116-@Callable(q)
117-func addTask (t,u) = if (!(n(q.caller)))
116+func s (j) = if (!(n(j)))
118117 then throw("grants working group access only")
119- else WriteSet([DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_title"), t), DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_link"), u)])
118+ else true
119+
120+
121+func t (j,u) = if (!(n(j)))
122+ then throw("grants working group access only")
123+ else if ((h((("tasks_" + u) + "_status")) != ""))
124+ then throw("grant isn`t new")
125+ else true
126+
127+
128+func v (j,u) = if (!(p(j)))
129+ then throw("you can't vote")
130+ else if ((getStringValue(this, (("tasks_" + u) + "_status")) != "proposed"))
131+ then throw("voting is closed or not started")
132+ else if ((c(((("tasks_" + u) + "_voted_") + toString(j))) != 0))
133+ then throw("you have already voted")
134+ else true
135+
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)])
140+ else throw("checks are not passed")
120141
121142
122143
123-@Callable(q)
124-func addReward (v) = if (!(n(q.caller)))
125- then throw("grants working group access only")
126- else {
127- let w = extract(q.payment).amount
128- WriteSet([DataEntry((("tasks_" + v) + "_reward"), w), DataEntry((("tasks_" + v) + "_status"), "proposed")])
144+@Callable(w)
145+func addReward (u) = if (t(w.caller, u))
146+ then {
147+ let z = extract(w.payment).amount
148+ WriteSet([DataEntry((("tasks_" + u) + "_reward"), z), DataEntry((("tasks_" + u) + "_status"), "proposed")])
129149 }
150+ else throw("checks are not passed")
130151
131152
132153
133-@Callable(q)
134-func voteForTaskProposal (v,x) = if (!(p(q)))
135- then throw("you can't vote")
136- else if ((getStringValue(this, (("tasks_" + v) + "_status")) != "proposed"))
137- then throw("voting is closed or not started")
138- else if (if ((x != "like"))
139- then (x != "dislike")
140- else false)
141- then throw("you need to vote like or dislike")
142- else {
143- let y = r(x)
144- let z = ((("tasks_" + v) + "_voted_") + toString(q.caller))
145- let A = c(z)
146- if (!((A == 0)))
147- then throw("you have already voted")
148- else {
149- let B = (("tasks_" + v) + "_voting_state")
150- let C = c(B)
151- let D = (("tasks_" + v) + "_voting_amount")
152- let E = (c(B) + 1)
153- let F = (C + y)
154- ScriptResult(WriteSet([DataEntry(B, F), DataEntry(z, y), DataEntry(D, E)]), TransferSet([ScriptTransfer(q.caller, 500000, unit)]))
155- }
156- }
154+@Callable(w)
155+func voteForTaskProposal (u,A) = if (v(w.caller, u))
156+ then {
157+ let B = ((("tasks_" + u) + "_voted_") + toString(w.caller))
158+ let C = (("tasks_" + u) + "_voting_state")
159+ let D = c(C)
160+ let E = (("tasks_" + u) + "_voting_amount")
161+ let F = (c(C) + 1)
162+ let G = q(A)
163+ let H = (D + G)
164+ WriteSet([DataEntry(C, H), DataEntry(B, G), DataEntry(E, F)])
165+ }
166+ else throw("checks are not passed")
157167
158168
159169
160-@Callable(q)
161-func finishTaskProposalVoting (v) = if ((b > ((c((("tasks_" + v) + "_voting_amount")) * 100) / m())))
170+@Callable(w)
171+func finishTaskProposalVoting (u) = if ((b > ((c((("tasks_" + u) + "_voting_amount")) * 100) / m())))
162172 then throw((("more than " + toString(b)) + "% members have to vote before finishing the voting"))
163- else if (!(n(q.caller)))
173+ else if (!(n(w.caller)))
164174 then throw("grants working group access only")
165175 else {
166- let B = (("tasks_" + v) + "_voting_state")
167- let C = c(B)
168- if ((C > 0))
176+ let C = (("tasks_" + u) + "_voting_state")
177+ let D = c(C)
178+ if ((D > 0))
169179 then {
170- let G = "ready_to_apply"
171- WriteSet([DataEntry((("tasks_" + v) + "_status"), G)])
180+ let I = "ready_to_apply"
181+ WriteSet([DataEntry((("tasks_" + u) + "_status"), I)])
172182 }
173183 else {
174- let G = "rejected"
175- WriteSet([DataEntry((("tasks_" + v) + "_status"), G)])
184+ let I = "rejected"
185+ WriteSet([DataEntry((("tasks_" + u) + "_status"), I)])
176186 }
177187 }
178188
179189
180190
181-@Callable(q)
182-func applyForTask (v,H,u) = {
183- let I = h((("tasks_" + v) + "_status"))
184- if ((I != "ready_to_apply"))
191+@Callable(w)
192+func applyForTask (u,J,y) = {
193+ let K = h((("tasks_" + u) + "_status"))
194+ if ((K != "ready_to_apply"))
185195 then throw("This grant has not yet been approved")
186196 else {
187- let J = (("tasks_" + v) + "_applicants")
188- let K = h(J)
189- let L = drop(toString(q.caller), 10)
190- let M = ((K + ";") + toString(q.caller))
191- WriteSet([DataEntry((((("tasks_" + v) + "_app_") + L) + "_name"), H), DataEntry((((("tasks_" + v) + "_app_") + L) + "_link"), u), DataEntry((((("tasks_" + v) + "_app_") + L) + "_leader"), toString(q.caller)), DataEntry((((("tasks_" + v) + "_app_") + L) + "_id"), L), DataEntry(J, M)])
197+ let L = (("tasks_" + u) + "_applicants")
198+ let M = h(L)
199+ let N = drop(toString(w.caller), 10)
200+ let O = ((M + ";") + toString(w.caller))
201+ WriteSet([DataEntry((((("tasks_" + u) + "_app_") + N) + "_name"), J), DataEntry((((("tasks_" + u) + "_app_") + N) + "_link"), y), DataEntry((((("tasks_" + u) + "_app_") + N) + "_leader"), toString(w.caller)), DataEntry((((("tasks_" + u) + "_app_") + N) + "_id"), N), DataEntry(L, O)])
192202 }
193203 }
194204
195205
196206
197-@Callable(q)
198-func voteForApplicant (v,N,x) = if (!(p(q)))
207+@Callable(w)
208+func voteForApplicant (u,P,A) = if (!(p(w.caller)))
199209 then throw("you can't vote")
200210 else {
201- let O = (drop(toString(q.caller), 10) + drop(N, 10))
202- let z = ((("tasks_" + v) + "_vote_") + O)
203- let P = c(z)
204- if ((P != 0))
211+ let Q = (drop(toString(w.caller), 10) + drop(P, 10))
212+ let B = ((("tasks_" + u) + "_vote_") + Q)
213+ let R = c(B)
214+ if ((R != 0))
205215 then throw("you have already voted on this team")
206216 else {
207- let y = r(x)
208- let Q = (((("tasks_" + v) + "_app_") + N) + "_votes")
209- let R = (((("tasks_" + v) + "_app_") + N) + "_score")
210- let S = (1 + c(Q))
211- let T = (y + c(R))
212- WriteSet([DataEntry(z, y), DataEntry(R, T)])
217+ let S = q(A)
218+ let T = (((("tasks_" + u) + "_app_") + P) + "_votes")
219+ let U = (((("tasks_" + u) + "_app_") + P) + "_score")
220+ let V = (1 + c(T))
221+ let W = (S + c(U))
222+ WriteSet([DataEntry(B, S), DataEntry(U, W)])
213223 }
214224 }
215225
216226
217227
218-@Callable(q)
219-func finishApplicantsVoting (v) = {
220- func U (V,W) = {
221- let J = (("tasks_" + v) + "_applicants")
222- let X = split(getStringValue(this, J), ";")
223- let N = X[V]
224- let Q = (((("tasks_" + v) + "_app_") + N) + "_votes")
225- let S = c(Q)
226- if ((S > 0))
228+@Callable(w)
229+func finishApplicantsVoting (u) = {
230+ func X (Y,Z) = {
231+ let L = (("tasks_" + u) + "_applicants")
232+ let aa = split(getStringValue(this, L), ";")
233+ let P = aa[Y]
234+ let T = (((("tasks_" + u) + "_app_") + P) + "_votes")
235+ let V = c(T)
236+ if ((V > 0))
227237 then 1
228- else throw(("not enough votes to make decision on " + N))
238+ else throw(("not enough votes to make decision on " + P))
229239 }
230240
231- func Y (V,W) = {
232- let J = (("tasks_" + v) + "_applicants")
233- let X = split(getStringValue(this, J), ";")
234- let N = X[V]
235- let Q = (((("tasks_" + v) + "_app_") + N) + "_votes")
236- let S = c(Q)
237- let Z = X[W]
238- let aa = (((("tasks_" + v) + "_app_") + Z) + "_votes")
239- let ab = c(aa)
240- if ((S > ab))
241- then V
242- else W
241+ func ab (Y,Z) = {
242+ let L = (("tasks_" + u) + "_applicants")
243+ let aa = split(getStringValue(this, L), ";")
244+ let P = aa[Y]
245+ let T = (((("tasks_" + u) + "_app_") + P) + "_votes")
246+ let V = c(T)
247+ let ac = aa[Z]
248+ let ad = (((("tasks_" + u) + "_app_") + ac) + "_votes")
249+ let ae = c(ad)
250+ if ((V > ae))
251+ then Y
252+ else Z
243253 }
244254
245- if (!(n(q.caller)))
255+ if (!(n(w.caller)))
246256 then throw("grants working group access only")
247257 else {
248- let ac = h((("tasks_" + v) + "_applicants"))
249- let X = split(ac, ";")
250- if ((size(X) == 0))
258+ let af = h((("tasks_" + u) + "_applicants"))
259+ let aa = split(af, ";")
260+ if ((size(aa) == 0))
251261 then throw("No one has yet responded to the grant")
252262 else {
253- let ad = {
254- let ae = [0, 1]
255- let af = size(ae)
256- let ag = 0
257- if ((af == 0))
258- then ag
263+ let ag = {
264+ let ah = [0, 1]
265+ let ai = size(ah)
266+ let aj = 0
267+ if ((ai == 0))
268+ then aj
259269 else {
260- let ah = Y(ag, ae[0])
261- if ((af == 1))
262- then ah
270+ let ak = ab(aj, ah[0])
271+ if ((ai == 1))
272+ then ak
263273 else {
264- let ai = Y(ah, ae[1])
265- if ((af == 2))
266- then ai
274+ let al = ab(ak, ah[1])
275+ if ((ai == 2))
276+ then al
267277 else {
268- let aj = Y(ai, ae[2])
278+ let am = ab(al, ah[2])
269279 throw("List size exceed 2")
270280 }
271281 }
272282 }
273283 }
274- let N = X[ad]
275- WriteSet([DataEntry((("tasks_" + v) + "_status"), "team_chosen"), DataEntry((("tasks_" + v) + "_performer"), N), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "can_begin")])
284+ let P = aa[ag]
285+ WriteSet([DataEntry((("tasks_" + u) + "_status"), "team_chosen"), DataEntry((("tasks_" + u) + "_performer"), P), DataEntry((((("tasks_" + u) + "_app_") + P) + "_process"), "can_begin")])
276286 }
277287 }
278288 }
279289
280290
281291
282-@Callable(q)
283-func startWork (v) = {
284- let N = getStringValue(this, (("tasks_" + v) + "_performer"))
285- if ((toString(q.caller) != getStringValue(this, (((("tasks_" + v) + "_app_") + N) + "_leader"))))
292+@Callable(w)
293+func startWork (u) = {
294+ let P = getStringValue(this, (("tasks_" + u) + "_performer"))
295+ if ((toString(w.caller) != getStringValue(this, (((("tasks_" + u) + "_app_") + P) + "_leader"))))
286296 then throw("team leader only")
287- else WriteSet([DataEntry((("tasks_" + v) + "_status"), "work_started"), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "work_started")])
297+ else WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_started"), DataEntry((((("tasks_" + u) + "_app_") + P) + "_process"), "work_started")])
288298 }
289299
290300
291301
292-@Callable(q)
293-func acceptWorkResult (v,ak) = if (!(n(q.caller)))
302+@Callable(w)
303+func acceptWorkResult (u,an) = if (!(n(w.caller)))
294304 then throw("grants working group access only")
295305 else {
296- let al = c((("tasks_" + v) + "_reward"))
297- let N = getStringValue(this, (("tasks_" + v) + "_performer"))
298- let am = getStringValue(this, (((("tasks_" + v) + "_app_") + N) + "_leader"))
299- ScriptResult(WriteSet([DataEntry((("tasks_" + v) + "_status"), "work_finished"), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "work_finished"), DataEntry((("tasks_" + v) + "_report"), ak)]), TransferSet([ScriptTransfer(addressFromStringValue(am), al, unit)]))
306+ let ao = c((("tasks_" + u) + "_reward"))
307+ let P = getStringValue(this, (("tasks_" + u) + "_performer"))
308+ let ap = getStringValue(this, (((("tasks_" + u) + "_app_") + P) + "_leader"))
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)]))
300310 }
301311
302312
303313
304-@Callable(q)
305-func rejectTask (v) = if (!(n(q.caller)))
314+@Callable(w)
315+func rejectTask (u) = if (!(n(w.caller)))
306316 then throw("grants working group access only")
307- else WriteSet([DataEntry((("tasks_" + v) + "_status"), "rejected")])
317+ else WriteSet([DataEntry((("tasks_" + u) + "_status"), "rejected")])
308318
309319
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
95-func p (q) = {
95+func p (j) = {
9696 let e = {
97- let f = getInteger(a, (("dao_member_" + toString(q.caller)) + "_weight"))
97+ 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
109-func r (s) = if ((s == "like"))
109+func q (r) = if ((r == "like"))
110110 then 1
111- else if ((s == "dislike"))
111+ else if ((r == "dislike"))
112112 then -1
113113 else throw("you need to vote with 'like' or 'dislike' value")
114114
115115
116-@Callable(q)
117-func addTask (t,u) = if (!(n(q.caller)))
116+func s (j) = if (!(n(j)))
118117 then throw("grants working group access only")
119- else WriteSet([DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_title"), t), DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_link"), u)])
118+ else true
119+
120+
121+func t (j,u) = if (!(n(j)))
122+ then throw("grants working group access only")
123+ else if ((h((("tasks_" + u) + "_status")) != ""))
124+ then throw("grant isn`t new")
125+ else true
126+
127+
128+func v (j,u) = if (!(p(j)))
129+ then throw("you can't vote")
130+ else if ((getStringValue(this, (("tasks_" + u) + "_status")) != "proposed"))
131+ then throw("voting is closed or not started")
132+ else if ((c(((("tasks_" + u) + "_voted_") + toString(j))) != 0))
133+ then throw("you have already voted")
134+ else true
135+
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)])
140+ else throw("checks are not passed")
120141
121142
122143
123-@Callable(q)
124-func addReward (v) = if (!(n(q.caller)))
125- then throw("grants working group access only")
126- else {
127- let w = extract(q.payment).amount
128- WriteSet([DataEntry((("tasks_" + v) + "_reward"), w), DataEntry((("tasks_" + v) + "_status"), "proposed")])
144+@Callable(w)
145+func addReward (u) = if (t(w.caller, u))
146+ then {
147+ let z = extract(w.payment).amount
148+ WriteSet([DataEntry((("tasks_" + u) + "_reward"), z), DataEntry((("tasks_" + u) + "_status"), "proposed")])
129149 }
150+ else throw("checks are not passed")
130151
131152
132153
133-@Callable(q)
134-func voteForTaskProposal (v,x) = if (!(p(q)))
135- then throw("you can't vote")
136- else if ((getStringValue(this, (("tasks_" + v) + "_status")) != "proposed"))
137- then throw("voting is closed or not started")
138- else if (if ((x != "like"))
139- then (x != "dislike")
140- else false)
141- then throw("you need to vote like or dislike")
142- else {
143- let y = r(x)
144- let z = ((("tasks_" + v) + "_voted_") + toString(q.caller))
145- let A = c(z)
146- if (!((A == 0)))
147- then throw("you have already voted")
148- else {
149- let B = (("tasks_" + v) + "_voting_state")
150- let C = c(B)
151- let D = (("tasks_" + v) + "_voting_amount")
152- let E = (c(B) + 1)
153- let F = (C + y)
154- ScriptResult(WriteSet([DataEntry(B, F), DataEntry(z, y), DataEntry(D, E)]), TransferSet([ScriptTransfer(q.caller, 500000, unit)]))
155- }
156- }
154+@Callable(w)
155+func voteForTaskProposal (u,A) = if (v(w.caller, u))
156+ then {
157+ let B = ((("tasks_" + u) + "_voted_") + toString(w.caller))
158+ let C = (("tasks_" + u) + "_voting_state")
159+ let D = c(C)
160+ let E = (("tasks_" + u) + "_voting_amount")
161+ let F = (c(C) + 1)
162+ let G = q(A)
163+ let H = (D + G)
164+ WriteSet([DataEntry(C, H), DataEntry(B, G), DataEntry(E, F)])
165+ }
166+ else throw("checks are not passed")
157167
158168
159169
160-@Callable(q)
161-func finishTaskProposalVoting (v) = if ((b > ((c((("tasks_" + v) + "_voting_amount")) * 100) / m())))
170+@Callable(w)
171+func finishTaskProposalVoting (u) = if ((b > ((c((("tasks_" + u) + "_voting_amount")) * 100) / m())))
162172 then throw((("more than " + toString(b)) + "% members have to vote before finishing the voting"))
163- else if (!(n(q.caller)))
173+ else if (!(n(w.caller)))
164174 then throw("grants working group access only")
165175 else {
166- let B = (("tasks_" + v) + "_voting_state")
167- let C = c(B)
168- if ((C > 0))
176+ let C = (("tasks_" + u) + "_voting_state")
177+ let D = c(C)
178+ if ((D > 0))
169179 then {
170- let G = "ready_to_apply"
171- WriteSet([DataEntry((("tasks_" + v) + "_status"), G)])
180+ let I = "ready_to_apply"
181+ WriteSet([DataEntry((("tasks_" + u) + "_status"), I)])
172182 }
173183 else {
174- let G = "rejected"
175- WriteSet([DataEntry((("tasks_" + v) + "_status"), G)])
184+ let I = "rejected"
185+ WriteSet([DataEntry((("tasks_" + u) + "_status"), I)])
176186 }
177187 }
178188
179189
180190
181-@Callable(q)
182-func applyForTask (v,H,u) = {
183- let I = h((("tasks_" + v) + "_status"))
184- if ((I != "ready_to_apply"))
191+@Callable(w)
192+func applyForTask (u,J,y) = {
193+ let K = h((("tasks_" + u) + "_status"))
194+ if ((K != "ready_to_apply"))
185195 then throw("This grant has not yet been approved")
186196 else {
187- let J = (("tasks_" + v) + "_applicants")
188- let K = h(J)
189- let L = drop(toString(q.caller), 10)
190- let M = ((K + ";") + toString(q.caller))
191- WriteSet([DataEntry((((("tasks_" + v) + "_app_") + L) + "_name"), H), DataEntry((((("tasks_" + v) + "_app_") + L) + "_link"), u), DataEntry((((("tasks_" + v) + "_app_") + L) + "_leader"), toString(q.caller)), DataEntry((((("tasks_" + v) + "_app_") + L) + "_id"), L), DataEntry(J, M)])
197+ let L = (("tasks_" + u) + "_applicants")
198+ let M = h(L)
199+ let N = drop(toString(w.caller), 10)
200+ let O = ((M + ";") + toString(w.caller))
201+ WriteSet([DataEntry((((("tasks_" + u) + "_app_") + N) + "_name"), J), DataEntry((((("tasks_" + u) + "_app_") + N) + "_link"), y), DataEntry((((("tasks_" + u) + "_app_") + N) + "_leader"), toString(w.caller)), DataEntry((((("tasks_" + u) + "_app_") + N) + "_id"), N), DataEntry(L, O)])
192202 }
193203 }
194204
195205
196206
197-@Callable(q)
198-func voteForApplicant (v,N,x) = if (!(p(q)))
207+@Callable(w)
208+func voteForApplicant (u,P,A) = if (!(p(w.caller)))
199209 then throw("you can't vote")
200210 else {
201- let O = (drop(toString(q.caller), 10) + drop(N, 10))
202- let z = ((("tasks_" + v) + "_vote_") + O)
203- let P = c(z)
204- if ((P != 0))
211+ let Q = (drop(toString(w.caller), 10) + drop(P, 10))
212+ let B = ((("tasks_" + u) + "_vote_") + Q)
213+ let R = c(B)
214+ if ((R != 0))
205215 then throw("you have already voted on this team")
206216 else {
207- let y = r(x)
208- let Q = (((("tasks_" + v) + "_app_") + N) + "_votes")
209- let R = (((("tasks_" + v) + "_app_") + N) + "_score")
210- let S = (1 + c(Q))
211- let T = (y + c(R))
212- WriteSet([DataEntry(z, y), DataEntry(R, T)])
217+ let S = q(A)
218+ let T = (((("tasks_" + u) + "_app_") + P) + "_votes")
219+ let U = (((("tasks_" + u) + "_app_") + P) + "_score")
220+ let V = (1 + c(T))
221+ let W = (S + c(U))
222+ WriteSet([DataEntry(B, S), DataEntry(U, W)])
213223 }
214224 }
215225
216226
217227
218-@Callable(q)
219-func finishApplicantsVoting (v) = {
220- func U (V,W) = {
221- let J = (("tasks_" + v) + "_applicants")
222- let X = split(getStringValue(this, J), ";")
223- let N = X[V]
224- let Q = (((("tasks_" + v) + "_app_") + N) + "_votes")
225- let S = c(Q)
226- if ((S > 0))
228+@Callable(w)
229+func finishApplicantsVoting (u) = {
230+ func X (Y,Z) = {
231+ let L = (("tasks_" + u) + "_applicants")
232+ let aa = split(getStringValue(this, L), ";")
233+ let P = aa[Y]
234+ let T = (((("tasks_" + u) + "_app_") + P) + "_votes")
235+ let V = c(T)
236+ if ((V > 0))
227237 then 1
228- else throw(("not enough votes to make decision on " + N))
238+ else throw(("not enough votes to make decision on " + P))
229239 }
230240
231- func Y (V,W) = {
232- let J = (("tasks_" + v) + "_applicants")
233- let X = split(getStringValue(this, J), ";")
234- let N = X[V]
235- let Q = (((("tasks_" + v) + "_app_") + N) + "_votes")
236- let S = c(Q)
237- let Z = X[W]
238- let aa = (((("tasks_" + v) + "_app_") + Z) + "_votes")
239- let ab = c(aa)
240- if ((S > ab))
241- then V
242- else W
241+ func ab (Y,Z) = {
242+ let L = (("tasks_" + u) + "_applicants")
243+ let aa = split(getStringValue(this, L), ";")
244+ let P = aa[Y]
245+ let T = (((("tasks_" + u) + "_app_") + P) + "_votes")
246+ let V = c(T)
247+ let ac = aa[Z]
248+ let ad = (((("tasks_" + u) + "_app_") + ac) + "_votes")
249+ let ae = c(ad)
250+ if ((V > ae))
251+ then Y
252+ else Z
243253 }
244254
245- if (!(n(q.caller)))
255+ if (!(n(w.caller)))
246256 then throw("grants working group access only")
247257 else {
248- let ac = h((("tasks_" + v) + "_applicants"))
249- let X = split(ac, ";")
250- if ((size(X) == 0))
258+ let af = h((("tasks_" + u) + "_applicants"))
259+ let aa = split(af, ";")
260+ if ((size(aa) == 0))
251261 then throw("No one has yet responded to the grant")
252262 else {
253- let ad = {
254- let ae = [0, 1]
255- let af = size(ae)
256- let ag = 0
257- if ((af == 0))
258- then ag
263+ let ag = {
264+ let ah = [0, 1]
265+ let ai = size(ah)
266+ let aj = 0
267+ if ((ai == 0))
268+ then aj
259269 else {
260- let ah = Y(ag, ae[0])
261- if ((af == 1))
262- then ah
270+ let ak = ab(aj, ah[0])
271+ if ((ai == 1))
272+ then ak
263273 else {
264- let ai = Y(ah, ae[1])
265- if ((af == 2))
266- then ai
274+ let al = ab(ak, ah[1])
275+ if ((ai == 2))
276+ then al
267277 else {
268- let aj = Y(ai, ae[2])
278+ let am = ab(al, ah[2])
269279 throw("List size exceed 2")
270280 }
271281 }
272282 }
273283 }
274- let N = X[ad]
275- WriteSet([DataEntry((("tasks_" + v) + "_status"), "team_chosen"), DataEntry((("tasks_" + v) + "_performer"), N), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "can_begin")])
284+ let P = aa[ag]
285+ WriteSet([DataEntry((("tasks_" + u) + "_status"), "team_chosen"), DataEntry((("tasks_" + u) + "_performer"), P), DataEntry((((("tasks_" + u) + "_app_") + P) + "_process"), "can_begin")])
276286 }
277287 }
278288 }
279289
280290
281291
282-@Callable(q)
283-func startWork (v) = {
284- let N = getStringValue(this, (("tasks_" + v) + "_performer"))
285- if ((toString(q.caller) != getStringValue(this, (((("tasks_" + v) + "_app_") + N) + "_leader"))))
292+@Callable(w)
293+func startWork (u) = {
294+ let P = getStringValue(this, (("tasks_" + u) + "_performer"))
295+ if ((toString(w.caller) != getStringValue(this, (((("tasks_" + u) + "_app_") + P) + "_leader"))))
286296 then throw("team leader only")
287- else WriteSet([DataEntry((("tasks_" + v) + "_status"), "work_started"), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "work_started")])
297+ else WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_started"), DataEntry((((("tasks_" + u) + "_app_") + P) + "_process"), "work_started")])
288298 }
289299
290300
291301
292-@Callable(q)
293-func acceptWorkResult (v,ak) = if (!(n(q.caller)))
302+@Callable(w)
303+func acceptWorkResult (u,an) = if (!(n(w.caller)))
294304 then throw("grants working group access only")
295305 else {
296- let al = c((("tasks_" + v) + "_reward"))
297- let N = getStringValue(this, (("tasks_" + v) + "_performer"))
298- let am = getStringValue(this, (((("tasks_" + v) + "_app_") + N) + "_leader"))
299- ScriptResult(WriteSet([DataEntry((("tasks_" + v) + "_status"), "work_finished"), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "work_finished"), DataEntry((("tasks_" + v) + "_report"), ak)]), TransferSet([ScriptTransfer(addressFromStringValue(am), al, unit)]))
306+ let ao = c((("tasks_" + u) + "_reward"))
307+ let P = getStringValue(this, (("tasks_" + u) + "_performer"))
308+ let ap = getStringValue(this, (((("tasks_" + u) + "_app_") + P) + "_leader"))
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)]))
300310 }
301311
302312
303313
304-@Callable(q)
305-func rejectTask (v) = if (!(n(q.caller)))
314+@Callable(w)
315+func rejectTask (u) = if (!(n(w.caller)))
306316 then throw("grants working group access only")
307- else WriteSet([DataEntry((("tasks_" + v) + "_status"), "rejected")])
317+ else WriteSet([DataEntry((("tasks_" + u) + "_status"), "rejected")])
308318
309319

github/deemru/w8io/026f985 
86.98 ms