tx · 4vuJfi2arwN8NUw4DPiy5Mty5dsL8C8SmqbbBGHfAsAg

3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA:  -0.10000000 Waves

2020.12.22 13:21 [1319781] smart account 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA > SELF 0.00000000 Waves

{ "type": 13, "id": "4vuJfi2arwN8NUw4DPiy5Mty5dsL8C8SmqbbBGHfAsAg", "fee": 10000000, "feeAssetId": null, "timestamp": 1608632457910, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "3v4oNpsePa6GD4z2mv6RsphZEeKsPQTcpVqVrYkS5BZwR8Tv7nXNMgP3654phfG1GuvVgN1UTUnNKVGD3ZCnovha" ], "script": "base64:AAIDAAAAAAAAADUIARIECgIICBIDCgEIEgQKAggIEgMKAQgSBQoDCAgIEgUKAwgICBIDCgEIEgMKAQgSAwoBCAAAAAsAAAAADG1haW5Db250cmFjdAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTXdSemkyQm1xWlpYV3JDR0N3Y1JRTHNuaWMyQW9kNnpoUwAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckb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AAAIk9VrQ==", "height": 1319781, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HkCL8mHt1CDtPsYzRroxvjCfdQ3reRB89WQJHbvg9cJL Next: JBdTBC39pTrjmWb4Zkt735KfDCRZpc2GTTftVgWL7xLK Diff:
OldNewDifferences
106106 }
107107
108108
109+func r (s) = if ((s == "like"))
110+ then 1
111+ else if ((s == "dislike"))
112+ then -1
113+ else throw("you need to vote with 'like' or 'dislike' value")
114+
115+
109116 @Callable(q)
110-func addTask (r,s) = if (!(n(q.caller)))
117+func addTask (t,u) = if (!(n(q.caller)))
111118 then throw("grants working group access only")
112- else WriteSet([DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_title"), r), DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_link"), s)])
119+ else WriteSet([DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_title"), t), DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_link"), u)])
113120
114121
115122
116123 @Callable(q)
117-func addReward (t) = if (!(n(q.caller)))
124+func addReward (v) = if (!(n(q.caller)))
118125 then throw("grants working group access only")
119126 else {
120- let u = extract(q.payment).amount
121- WriteSet([DataEntry((("tasks_" + t) + "_reward"), u), DataEntry((("tasks_" + t) + "_status"), "proposed")])
127+ let w = extract(q.payment).amount
128+ WriteSet([DataEntry((("tasks_" + v) + "_reward"), w), DataEntry((("tasks_" + v) + "_status"), "proposed")])
122129 }
123130
124131
125132
126133 @Callable(q)
127-func voteForTaskProposal (t,v) = if (!(p(q)))
134+func voteForTaskProposal (v,x) = if (!(p(q)))
128135 then throw("you can't vote")
129- else if ((getStringValue(this, (("tasks_" + t) + "_status")) != "proposed"))
136+ else if ((getStringValue(this, (("tasks_" + v) + "_status")) != "proposed"))
130137 then throw("voting is closed or not started")
131- else if (if ((v != -1))
132- then (v != 1)
138+ else if (if ((x != "like"))
139+ then (x != "dislike")
133140 else false)
134- then throw("you need to vote 1 or -1")
141+ then throw("you need to vote like or dislike")
135142 else {
136- let w = ((("tasks_" + t) + "_voted_") + toString(q.caller))
137- let x = c(w)
138- if (!((x == 0)))
143+ let y = r(x)
144+ let z = ((("tasks_" + v) + "_voted_") + toString(q.caller))
145+ let A = c(z)
146+ if (!((A == 0)))
139147 then throw("you have already voted")
140148 else {
141- let y = (("tasks_" + t) + "_voting_state")
142- let z = c(y)
143- let A = (("tasks_" + t) + "_voting_amount")
144- let B = (c(y) + 1)
145- let C = (z + v)
146- ScriptResult(WriteSet([DataEntry(y, C), DataEntry(w, v), DataEntry(A, B)]), TransferSet([ScriptTransfer(q.caller, 500000, unit)]))
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)]))
147155 }
148156 }
149157
150158
151159
152160 @Callable(q)
153-func finishTaskProposalVoting (t) = if ((b > ((c((("tasks_" + t) + "_voting_amount")) * 100) / m())))
161+func finishTaskProposalVoting (v) = if ((b > ((c((("tasks_" + v) + "_voting_amount")) * 100) / m())))
154162 then throw((("more than " + toString(b)) + "% members have to vote before finishing the voting"))
155163 else if (!(n(q.caller)))
156164 then throw("grants working group access only")
157165 else {
158- let y = (("tasks_" + t) + "_voting_state")
159- let z = c(y)
160- if ((z > 0))
166+ let B = (("tasks_" + v) + "_voting_state")
167+ let C = c(B)
168+ if ((C > 0))
161169 then {
162- let D = "ready_to_apply"
163- WriteSet([DataEntry((("tasks_" + t) + "_status"), D)])
170+ let G = "ready_to_apply"
171+ WriteSet([DataEntry((("tasks_" + v) + "_status"), G)])
164172 }
165173 else {
166- let D = "rejected"
167- WriteSet([DataEntry((("tasks_" + t) + "_status"), D)])
174+ let G = "rejected"
175+ WriteSet([DataEntry((("tasks_" + v) + "_status"), G)])
168176 }
169177 }
170178
171179
172180
173181 @Callable(q)
174-func applyForTask (t,E,s) = {
175- let F = h((("tasks_" + t) + "_status"))
176- if ((F != "ready_to_apply"))
182+func applyForTask (v,H,u) = {
183+ let I = h((("tasks_" + v) + "_status"))
184+ if ((I != "ready_to_apply"))
177185 then throw("This grant has not yet been approved")
178186 else {
179- let G = (("tasks_" + t) + "_applicants")
180- let H = h(G)
181- let I = drop(toString(q.caller), 10)
182- let J = ((H + ";") + toString(q.caller))
183- WriteSet([DataEntry((((("tasks_" + t) + "_app_") + I) + "_name"), E), DataEntry((((("tasks_" + t) + "_app_") + I) + "_link"), s), DataEntry((((("tasks_" + t) + "_app_") + I) + "_leader"), toString(q.caller)), DataEntry((((("tasks_" + t) + "_app_") + I) + "_id"), I), DataEntry(G, J)])
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)])
184192 }
185193 }
186194
187195
188196
189197 @Callable(q)
190-func voteForApplicant (t,K,v) = if (!(p(q)))
198+func voteForApplicant (v,N,x) = if (!(p(q)))
191199 then throw("you can't vote")
192200 else {
193- let L = (drop(toString(q.caller), 10) + drop(K, 10))
194- let w = ((("tasks_" + t) + "_vote_") + L)
195- let M = c(w)
196- if ((M != 0))
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))
197205 then throw("you have already voted on this team")
198206 else {
199- let N = (((("tasks_" + t) + "_app_") + K) + "_votes")
200- let O = (((("tasks_" + t) + "_app_") + K) + "_score")
201- let P = (1 + c(N))
202- let Q = (v + c(O))
203- WriteSet([DataEntry(w, v), DataEntry(O, Q)])
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)])
204213 }
205214 }
206215
207216
208217
209218 @Callable(q)
210-func finishApplicantsVoting (t) = {
211- func R (S,T) = {
212- let G = (("tasks_" + t) + "_applicants")
213- let U = split(getStringValue(this, G), ";")
214- let K = U[S]
215- let N = (((("tasks_" + t) + "_app_") + K) + "_votes")
216- let P = c(N)
217- if ((P > 0))
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))
218227 then 1
219- else throw(("not enough votes to make decision on " + K))
228+ else throw(("not enough votes to make decision on " + N))
220229 }
221230
222- func V (S,T) = {
223- let G = (("tasks_" + t) + "_applicants")
224- let U = split(getStringValue(this, G), ";")
225- let K = U[S]
226- let N = (((("tasks_" + t) + "_app_") + K) + "_votes")
227- let P = c(N)
228- let W = U[T]
229- let X = (((("tasks_" + t) + "_app_") + W) + "_votes")
230- let Y = c(X)
231- if ((P > Y))
232- then S
233- else T
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
234243 }
235244
236245 if (!(n(q.caller)))
237246 then throw("grants working group access only")
238247 else {
239- let Z = h((("tasks_" + t) + "_applicants"))
240- let U = split(Z, ";")
241- if ((size(U) == 0))
248+ let ac = h((("tasks_" + v) + "_applicants"))
249+ let X = split(ac, ";")
250+ if ((size(X) == 0))
242251 then throw("No one has yet responded to the grant")
243252 else {
244- let aa = {
245- let ab = [0, 1]
246- let ac = size(ab)
247- let ad = 0
248- if ((ac == 0))
249- then ad
253+ let ad = {
254+ let ae = [0, 1]
255+ let af = size(ae)
256+ let ag = 0
257+ if ((af == 0))
258+ then ag
250259 else {
251- let ae = V(ad, ab[0])
252- if ((ac == 1))
253- then ae
260+ let ah = Y(ag, ae[0])
261+ if ((af == 1))
262+ then ah
254263 else {
255- let af = V(ae, ab[1])
256- if ((ac == 2))
257- then af
264+ let ai = Y(ah, ae[1])
265+ if ((af == 2))
266+ then ai
258267 else {
259- let ag = V(af, ab[2])
268+ let aj = Y(ai, ae[2])
260269 throw("List size exceed 2")
261270 }
262271 }
263272 }
264273 }
265- let K = U[aa]
266- WriteSet([DataEntry((("tasks_" + t) + "_status"), "team_chosen"), DataEntry((("tasks_" + t) + "_performer"), K), DataEntry((((("tasks_" + t) + "_app_") + K) + "_process"), "can_begin")])
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")])
267276 }
268277 }
269278 }
271280
272281
273282 @Callable(q)
274-func startWork (t) = {
275- let K = getStringValue(this, (("tasks_" + t) + "_performer"))
276- if ((toString(q.caller) != getStringValue(this, (((("tasks_" + t) + "_app_") + K) + "_leader"))))
283+func startWork (v) = {
284+ let N = getStringValue(this, (("tasks_" + v) + "_performer"))
285+ if ((toString(q.caller) != getStringValue(this, (((("tasks_" + v) + "_app_") + N) + "_leader"))))
277286 then throw("team leader only")
278- else WriteSet([DataEntry((("tasks_" + t) + "_status"), "work_started"), DataEntry((((("tasks_" + t) + "_app_") + K) + "_process"), "work_started")])
287+ else WriteSet([DataEntry((("tasks_" + v) + "_status"), "work_started"), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "work_started")])
279288 }
280289
281290
282291
283292 @Callable(q)
284-func acceptWorkResult (t) = if (!(n(q.caller)))
293+func acceptWorkResult (v) = if (!(n(q.caller)))
285294 then throw("grants working group access only")
286295 else {
287- let ah = c((("tasks_" + t) + "_reward"))
288- let K = getStringValue(this, (("tasks_" + t) + "_performer"))
289- let ai = getStringValue(this, (((("tasks_" + t) + "_app_") + K) + "_leader"))
290- ScriptResult(WriteSet([DataEntry((("tasks_" + t) + "_status"), "work_finished"), DataEntry((((("tasks_" + t) + "_app_") + K) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(ai), ah, unit)]))
296+ let ak = c((("tasks_" + v) + "_reward"))
297+ let N = getStringValue(this, (("tasks_" + v) + "_performer"))
298+ let al = getStringValue(this, (((("tasks_" + v) + "_app_") + N) + "_leader"))
299+ ScriptResult(WriteSet([DataEntry((("tasks_" + v) + "_status"), "work_finished"), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(al), ak, unit)]))
291300 }
292301
293302
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 (q) = {
9696 let e = {
9797 let f = getInteger(a, (("dao_member_" + toString(q.caller)) + "_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"))
110+ then 1
111+ else if ((s == "dislike"))
112+ then -1
113+ else throw("you need to vote with 'like' or 'dislike' value")
114+
115+
109116 @Callable(q)
110-func addTask (r,s) = if (!(n(q.caller)))
117+func addTask (t,u) = if (!(n(q.caller)))
111118 then throw("grants working group access only")
112- else WriteSet([DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_title"), r), DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_link"), s)])
119+ else WriteSet([DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_title"), t), DataEntry((("tasks_" + toBase58String(q.transactionId)) + "_link"), u)])
113120
114121
115122
116123 @Callable(q)
117-func addReward (t) = if (!(n(q.caller)))
124+func addReward (v) = if (!(n(q.caller)))
118125 then throw("grants working group access only")
119126 else {
120- let u = extract(q.payment).amount
121- WriteSet([DataEntry((("tasks_" + t) + "_reward"), u), DataEntry((("tasks_" + t) + "_status"), "proposed")])
127+ let w = extract(q.payment).amount
128+ WriteSet([DataEntry((("tasks_" + v) + "_reward"), w), DataEntry((("tasks_" + v) + "_status"), "proposed")])
122129 }
123130
124131
125132
126133 @Callable(q)
127-func voteForTaskProposal (t,v) = if (!(p(q)))
134+func voteForTaskProposal (v,x) = if (!(p(q)))
128135 then throw("you can't vote")
129- else if ((getStringValue(this, (("tasks_" + t) + "_status")) != "proposed"))
136+ else if ((getStringValue(this, (("tasks_" + v) + "_status")) != "proposed"))
130137 then throw("voting is closed or not started")
131- else if (if ((v != -1))
132- then (v != 1)
138+ else if (if ((x != "like"))
139+ then (x != "dislike")
133140 else false)
134- then throw("you need to vote 1 or -1")
141+ then throw("you need to vote like or dislike")
135142 else {
136- let w = ((("tasks_" + t) + "_voted_") + toString(q.caller))
137- let x = c(w)
138- if (!((x == 0)))
143+ let y = r(x)
144+ let z = ((("tasks_" + v) + "_voted_") + toString(q.caller))
145+ let A = c(z)
146+ if (!((A == 0)))
139147 then throw("you have already voted")
140148 else {
141- let y = (("tasks_" + t) + "_voting_state")
142- let z = c(y)
143- let A = (("tasks_" + t) + "_voting_amount")
144- let B = (c(y) + 1)
145- let C = (z + v)
146- ScriptResult(WriteSet([DataEntry(y, C), DataEntry(w, v), DataEntry(A, B)]), TransferSet([ScriptTransfer(q.caller, 500000, unit)]))
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)]))
147155 }
148156 }
149157
150158
151159
152160 @Callable(q)
153-func finishTaskProposalVoting (t) = if ((b > ((c((("tasks_" + t) + "_voting_amount")) * 100) / m())))
161+func finishTaskProposalVoting (v) = if ((b > ((c((("tasks_" + v) + "_voting_amount")) * 100) / m())))
154162 then throw((("more than " + toString(b)) + "% members have to vote before finishing the voting"))
155163 else if (!(n(q.caller)))
156164 then throw("grants working group access only")
157165 else {
158- let y = (("tasks_" + t) + "_voting_state")
159- let z = c(y)
160- if ((z > 0))
166+ let B = (("tasks_" + v) + "_voting_state")
167+ let C = c(B)
168+ if ((C > 0))
161169 then {
162- let D = "ready_to_apply"
163- WriteSet([DataEntry((("tasks_" + t) + "_status"), D)])
170+ let G = "ready_to_apply"
171+ WriteSet([DataEntry((("tasks_" + v) + "_status"), G)])
164172 }
165173 else {
166- let D = "rejected"
167- WriteSet([DataEntry((("tasks_" + t) + "_status"), D)])
174+ let G = "rejected"
175+ WriteSet([DataEntry((("tasks_" + v) + "_status"), G)])
168176 }
169177 }
170178
171179
172180
173181 @Callable(q)
174-func applyForTask (t,E,s) = {
175- let F = h((("tasks_" + t) + "_status"))
176- if ((F != "ready_to_apply"))
182+func applyForTask (v,H,u) = {
183+ let I = h((("tasks_" + v) + "_status"))
184+ if ((I != "ready_to_apply"))
177185 then throw("This grant has not yet been approved")
178186 else {
179- let G = (("tasks_" + t) + "_applicants")
180- let H = h(G)
181- let I = drop(toString(q.caller), 10)
182- let J = ((H + ";") + toString(q.caller))
183- WriteSet([DataEntry((((("tasks_" + t) + "_app_") + I) + "_name"), E), DataEntry((((("tasks_" + t) + "_app_") + I) + "_link"), s), DataEntry((((("tasks_" + t) + "_app_") + I) + "_leader"), toString(q.caller)), DataEntry((((("tasks_" + t) + "_app_") + I) + "_id"), I), DataEntry(G, J)])
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)])
184192 }
185193 }
186194
187195
188196
189197 @Callable(q)
190-func voteForApplicant (t,K,v) = if (!(p(q)))
198+func voteForApplicant (v,N,x) = if (!(p(q)))
191199 then throw("you can't vote")
192200 else {
193- let L = (drop(toString(q.caller), 10) + drop(K, 10))
194- let w = ((("tasks_" + t) + "_vote_") + L)
195- let M = c(w)
196- if ((M != 0))
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))
197205 then throw("you have already voted on this team")
198206 else {
199- let N = (((("tasks_" + t) + "_app_") + K) + "_votes")
200- let O = (((("tasks_" + t) + "_app_") + K) + "_score")
201- let P = (1 + c(N))
202- let Q = (v + c(O))
203- WriteSet([DataEntry(w, v), DataEntry(O, Q)])
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)])
204213 }
205214 }
206215
207216
208217
209218 @Callable(q)
210-func finishApplicantsVoting (t) = {
211- func R (S,T) = {
212- let G = (("tasks_" + t) + "_applicants")
213- let U = split(getStringValue(this, G), ";")
214- let K = U[S]
215- let N = (((("tasks_" + t) + "_app_") + K) + "_votes")
216- let P = c(N)
217- if ((P > 0))
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))
218227 then 1
219- else throw(("not enough votes to make decision on " + K))
228+ else throw(("not enough votes to make decision on " + N))
220229 }
221230
222- func V (S,T) = {
223- let G = (("tasks_" + t) + "_applicants")
224- let U = split(getStringValue(this, G), ";")
225- let K = U[S]
226- let N = (((("tasks_" + t) + "_app_") + K) + "_votes")
227- let P = c(N)
228- let W = U[T]
229- let X = (((("tasks_" + t) + "_app_") + W) + "_votes")
230- let Y = c(X)
231- if ((P > Y))
232- then S
233- else T
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
234243 }
235244
236245 if (!(n(q.caller)))
237246 then throw("grants working group access only")
238247 else {
239- let Z = h((("tasks_" + t) + "_applicants"))
240- let U = split(Z, ";")
241- if ((size(U) == 0))
248+ let ac = h((("tasks_" + v) + "_applicants"))
249+ let X = split(ac, ";")
250+ if ((size(X) == 0))
242251 then throw("No one has yet responded to the grant")
243252 else {
244- let aa = {
245- let ab = [0, 1]
246- let ac = size(ab)
247- let ad = 0
248- if ((ac == 0))
249- then ad
253+ let ad = {
254+ let ae = [0, 1]
255+ let af = size(ae)
256+ let ag = 0
257+ if ((af == 0))
258+ then ag
250259 else {
251- let ae = V(ad, ab[0])
252- if ((ac == 1))
253- then ae
260+ let ah = Y(ag, ae[0])
261+ if ((af == 1))
262+ then ah
254263 else {
255- let af = V(ae, ab[1])
256- if ((ac == 2))
257- then af
264+ let ai = Y(ah, ae[1])
265+ if ((af == 2))
266+ then ai
258267 else {
259- let ag = V(af, ab[2])
268+ let aj = Y(ai, ae[2])
260269 throw("List size exceed 2")
261270 }
262271 }
263272 }
264273 }
265- let K = U[aa]
266- WriteSet([DataEntry((("tasks_" + t) + "_status"), "team_chosen"), DataEntry((("tasks_" + t) + "_performer"), K), DataEntry((((("tasks_" + t) + "_app_") + K) + "_process"), "can_begin")])
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")])
267276 }
268277 }
269278 }
270279
271280
272281
273282 @Callable(q)
274-func startWork (t) = {
275- let K = getStringValue(this, (("tasks_" + t) + "_performer"))
276- if ((toString(q.caller) != getStringValue(this, (((("tasks_" + t) + "_app_") + K) + "_leader"))))
283+func startWork (v) = {
284+ let N = getStringValue(this, (("tasks_" + v) + "_performer"))
285+ if ((toString(q.caller) != getStringValue(this, (((("tasks_" + v) + "_app_") + N) + "_leader"))))
277286 then throw("team leader only")
278- else WriteSet([DataEntry((("tasks_" + t) + "_status"), "work_started"), DataEntry((((("tasks_" + t) + "_app_") + K) + "_process"), "work_started")])
287+ else WriteSet([DataEntry((("tasks_" + v) + "_status"), "work_started"), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "work_started")])
279288 }
280289
281290
282291
283292 @Callable(q)
284-func acceptWorkResult (t) = if (!(n(q.caller)))
293+func acceptWorkResult (v) = if (!(n(q.caller)))
285294 then throw("grants working group access only")
286295 else {
287- let ah = c((("tasks_" + t) + "_reward"))
288- let K = getStringValue(this, (("tasks_" + t) + "_performer"))
289- let ai = getStringValue(this, (((("tasks_" + t) + "_app_") + K) + "_leader"))
290- ScriptResult(WriteSet([DataEntry((("tasks_" + t) + "_status"), "work_finished"), DataEntry((((("tasks_" + t) + "_app_") + K) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(ai), ah, unit)]))
296+ let ak = c((("tasks_" + v) + "_reward"))
297+ let N = getStringValue(this, (("tasks_" + v) + "_performer"))
298+ let al = getStringValue(this, (((("tasks_" + v) + "_app_") + N) + "_leader"))
299+ ScriptResult(WriteSet([DataEntry((("tasks_" + v) + "_status"), "work_finished"), DataEntry((((("tasks_" + v) + "_app_") + N) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(al), ak, unit)]))
291300 }
292301
293302

github/deemru/w8io/026f985 
141.24 ms