tx · DZ8ac63CPQubpKUPPn2XZ4WShH2bb3VB4tzRkgbJAtS7

3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA:  -0.10000000 Waves

2020.12.27 05:32 [1326508] smart account 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA > SELF 0.00000000 Waves

{ "type": 13, "id": "DZ8ac63CPQubpKUPPn2XZ4WShH2bb3VB4tzRkgbJAtS7", "fee": 10000000, "feeAssetId": null, "timestamp": 1609036427467, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "3Rvpq1HWoh3L9JhXiQX95HhdTVVz2fM3mRaZryZW8L9honZLKvS3DixEu3PExS1MD6u7GRoEgYpDStGtje8nccb4" ], "script": "base64:AAIDAAAAAAAAADsIARIECgIICBIDCgEIEgQKAggIEgMKAQgSBQoDCAgIEgUKAwgICBIDCgEIEgMKAQgSBAoCCAgSAwoBCAAAABQAAAAADG1haW5Db250cmFjdAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTXdSemkyQm1xWlpYV3JDR0N3Y1JRTHNuaWMyQW9kNnpoUwAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAA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dfc3RhdHVzAgAAAAhyZWplY3RlZAUAAAADbmlsCQAAAgAAAAECAAAAIGdyYW50cyB3b3JraW5nIGdyb3VwIGFjY2VzcyBvbmx5AAAAAG0jxeM=", "height": 1326508, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6GFQRCNVFcpDhrPJzHMeqirYZba3m4Ht7LoR3N3A4ted Next: 8VjJ6RfRX1FR5boUnU7DohQpGWgtXUaeQCLE1YShNoYr Diff:
OldNewDifferences
143143 else true
144144
145145
146-@Callable(x)
147-func addTask (y,z) = if (s(x.caller))
148- then WriteSet([DataEntry((("tasks_" + toBase58String(x.transactionId)) + "_title"), y), DataEntry((("tasks_" + toBase58String(x.transactionId)) + "_link"), z)])
146+func x (j,u) = if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
147+ then throw("This grant has not yet been approved")
148+ else true
149+
150+
151+func y (j,u,z) = {
152+ let A = (drop(toString(j), 10) + drop(z, 10))
153+ if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
154+ then throw("This grant has not yet been approved")
155+ else if ((c(((("tasks_" + u) + "_vote_") + A)) != 0))
156+ then throw("you have already voted on this team")
157+ else true
158+ }
159+
160+
161+func B (j,u,C) = if (!(n(j)))
162+ then throw("grants working group access only")
163+ else if ((size(C) == 0))
164+ then throw("No one has yet responded to the grant")
165+ else true
166+
167+
168+func D (j,u,z) = if ((toString(j) != h((((("tasks_" + u) + "_app_") + z) + "_leader"))))
169+ then throw("team leader only")
170+ else true
171+
172+
173+func E (j,u) = if (!(n(j)))
174+ then throw("grants working group access only")
175+ else true
176+
177+
178+@Callable(F)
179+func addTask (G,H) = if (s(F.caller))
180+ then WriteSet([DataEntry((("tasks_" + toBase58String(F.transactionId)) + "_title"), G), DataEntry((("tasks_" + toBase58String(F.transactionId)) + "_link"), H)])
149181 else throw("checks are not passed")
150182
151183
152184
153-@Callable(x)
154-func addReward (u) = if (t(x.caller, u))
185+@Callable(F)
186+func addReward (u) = if (t(F.caller, u))
155187 then {
156- let A = extract(x.payment).amount
157- WriteSet([DataEntry((("tasks_" + u) + "_reward"), A), DataEntry((("tasks_" + u) + "_status"), "proposed")])
188+ let I = extract(F.payment).amount
189+ WriteSet([DataEntry((("tasks_" + u) + "_reward"), I), DataEntry((("tasks_" + u) + "_status"), "proposed")])
158190 }
159191 else throw("checks are not passed")
160192
161193
162194
163-@Callable(x)
164-func voteForTaskProposal (u,B) = if (v(x.caller, u))
195+@Callable(F)
196+func voteForTaskProposal (u,J) = if (v(F.caller, u))
165197 then {
166- let C = ((("tasks_" + u) + "_voted_") + toString(x.caller))
167- let D = (("tasks_" + u) + "_voting_state")
168- let E = c(D)
169- let F = (("tasks_" + u) + "_voting_amount")
170- let G = (c(D) + 1)
171- let H = q(B)
172- let I = (E + H)
173- WriteSet([DataEntry(D, I), DataEntry(C, H), DataEntry(F, G)])
198+ let K = ((("tasks_" + u) + "_voted_") + toString(F.caller))
199+ let L = (("tasks_" + u) + "_voting_state")
200+ let M = c(L)
201+ let N = (("tasks_" + u) + "_voting_amount")
202+ let O = (c(L) + 1)
203+ let P = q(J)
204+ let Q = (M + P)
205+ WriteSet([DataEntry(L, Q), DataEntry(K, P), DataEntry(N, O)])
174206 }
175207 else throw("checks are not passed")
176208
177209
178210
179-@Callable(x)
180-func finishTaskProposalVoting (u) = if (w(x.caller, u))
211+@Callable(F)
212+func finishTaskProposalVoting (u) = if (w(F.caller, u))
181213 then {
182- let D = (("tasks_" + u) + "_voting_state")
183- WriteSet([DataEntry((("tasks_" + u) + "_status"), if ((c(D) > 0))
214+ let L = (("tasks_" + u) + "_voting_state")
215+ WriteSet([DataEntry((("tasks_" + u) + "_status"), if ((c(L) > 0))
184216 then "ready_to_apply"
185217 else "rejected")])
186218 }
188220
189221
190222
191-@Callable(x)
192-func applyForTask (u,J,z) = {
193- let K = h((("tasks_" + u) + "_status"))
194- if ((K != "ready_to_apply"))
195- then throw("This grant has not yet been approved")
196- else {
197- let L = (("tasks_" + u) + "_applicants")
198- let M = h(L)
199- let N = drop(toString(x.caller), 10)
200- let O = ((M + ";") + toString(x.caller))
201- WriteSet([DataEntry((((("tasks_" + u) + "_app_") + N) + "_name"), J), DataEntry((((("tasks_" + u) + "_app_") + N) + "_link"), z), DataEntry((((("tasks_" + u) + "_app_") + N) + "_leader"), toString(x.caller)), DataEntry((((("tasks_" + u) + "_app_") + N) + "_id"), N), DataEntry(L, O)])
223+@Callable(F)
224+func applyForTask (u,R,H) = if (x(F.caller, u))
225+ then {
226+ let S = (("tasks_" + u) + "_applicants")
227+ let T = h(S)
228+ let z = drop(toString(F.caller), 10)
229+ let U = ((T + ";") + toString(F.caller))
230+ WriteSet([DataEntry((((("tasks_" + u) + "_app_") + z) + "_name"), R), DataEntry((((("tasks_" + u) + "_app_") + z) + "_link"), H), DataEntry((((("tasks_" + u) + "_app_") + z) + "_leader"), toString(F.caller)), DataEntry((((("tasks_" + u) + "_app_") + z) + "_id"), z), DataEntry(S, U)])
231+ }
232+ else throw("checks are not passed")
233+
234+
235+
236+@Callable(F)
237+func voteForApplicant (u,z,J) = if (y(F.caller, u, z))
238+ then {
239+ let S = (((("tasks_" + u) + "_app_") + z) + "_voted")
240+ let U = ((h(S) + ";") + toString(F.caller))
241+ let A = (drop(toString(F.caller), 20) + z)
242+ let K = ((("tasks_" + u) + "_vh_") + A)
243+ if ((h(K) == toString(F.caller)))
244+ then throw("you have already voted on this team")
245+ else {
246+ let V = (((("tasks_" + u) + "_app_") + z) + "_votes")
247+ let W = (((("tasks_" + u) + "_app_") + z) + "_score")
248+ let X = (1 + c(V))
249+ let Y = (q(J) + c(W))
250+ WriteSet([DataEntry(S, U), DataEntry(K, toString(F.caller)), DataEntry(V, X), DataEntry(W, Y)])
251+ }
252+ }
253+ else throw("checks are not passed")
254+
255+
256+
257+@Callable(F)
258+func finishApplicantsVoting (u) = {
259+ func Z (aa,ab) = {
260+ let S = (("tasks_" + u) + "_applicants")
261+ let C = split(getStringValue(this, S), ";")
262+ let z = C[aa]
263+ let V = (((("tasks_" + u) + "_app_") + z) + "_votes")
264+ let X = c(V)
265+ let ac = C[ab]
266+ let ad = (((("tasks_" + u) + "_app_") + ac) + "_votes")
267+ let ae = c(ad)
268+ if ((X > ae))
269+ then aa
270+ else ab
271+ }
272+
273+ let af = h((("tasks_" + u) + "_applicants"))
274+ let C = split(af, ";")
275+ if (B(F.caller, u, C))
276+ then {
277+ let ag = {
278+ let ah = [0, 1]
279+ let ai = size(ah)
280+ let aj = 0
281+ if ((ai == 0))
282+ then aj
283+ else {
284+ let ak = Z(aj, ah[0])
285+ if ((ai == 1))
286+ then ak
287+ else {
288+ let al = Z(ak, ah[1])
289+ if ((ai == 2))
290+ then al
291+ else {
292+ let am = Z(al, ah[2])
293+ throw("List size exceed 2")
294+ }
295+ }
296+ }
297+ }
298+ let z = drop(C[ag], 20)
299+ WriteSet([DataEntry((("tasks_" + u) + "_status"), "team_chosen"), DataEntry((("tasks_" + u) + "_performer"), z), DataEntry((((("tasks_" + u) + "_app_") + z) + "_process"), "can_begin")])
202300 }
301+ else throw("checks are not passed")
203302 }
204303
205304
206305
207-@Callable(x)
208-func voteForApplicant (u,P,B) = if (!(p(x.caller)))
209- then throw("you can't vote")
210- else {
211- let Q = (drop(toString(x.caller), 10) + drop(P, 10))
212- let C = ((("tasks_" + u) + "_vote_") + Q)
213- let R = c(C)
214- if ((R != 0))
215- then throw("you have already voted on this team")
216- else {
217- let S = q(B)
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(C, S), DataEntry(U, W)])
223- }
224- }
225-
226-
227-
228-@Callable(x)
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))
237- then 1
238- else throw(("not enough votes to make decision on " + P))
239- }
240-
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
253- }
254-
255- if (!(n(x.caller)))
256- then throw("grants working group access only")
257- else {
258- let af = h((("tasks_" + u) + "_applicants"))
259- let aa = split(af, ";")
260- if ((size(aa) == 0))
261- then throw("No one has yet responded to the grant")
262- else {
263- let ag = {
264- let ah = [0, 1]
265- let ai = size(ah)
266- let aj = 0
267- if ((ai == 0))
268- then aj
269- else {
270- let ak = ab(aj, ah[0])
271- if ((ai == 1))
272- then ak
273- else {
274- let al = ab(ak, ah[1])
275- if ((ai == 2))
276- then al
277- else {
278- let am = ab(al, ah[2])
279- throw("List size exceed 2")
280- }
281- }
282- }
283- }
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")])
286- }
287- }
306+@Callable(F)
307+func startWork (u) = {
308+ let z = h((("tasks_" + u) + "_performer"))
309+ if (D(F.caller, u, z))
310+ then WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_started"), DataEntry((((("tasks_" + u) + "_app_") + z) + "_process"), "work_started")])
311+ else throw("checks are not passed")
288312 }
289313
290314
291315
292-@Callable(x)
293-func startWork (u) = {
294- let P = getStringValue(this, (("tasks_" + u) + "_performer"))
295- if ((toString(x.caller) != getStringValue(this, (((("tasks_" + u) + "_app_") + P) + "_leader"))))
296- then throw("team leader only")
297- else WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_started"), DataEntry((((("tasks_" + u) + "_app_") + P) + "_process"), "work_started")])
298- }
316+@Callable(F)
317+func acceptWorkResult (u,an) = if (E(F.caller, u))
318+ then {
319+ let ao = c((("tasks_" + u) + "_reward"))
320+ let z = h((("tasks_" + u) + "_performer"))
321+ let ap = h((((("tasks_" + u) + "_app_") + z) + "_leader"))
322+ ScriptResult(WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_finished"), DataEntry((((("tasks_" + u) + "_app_") + z) + "_process"), "work_finished"), DataEntry((("tasks_" + u) + "_report"), an)]), TransferSet([ScriptTransfer(addressFromStringValue(ap), ao, unit)]))
323+ }
324+ else throw("checks are not passed")
299325
300326
301327
302-@Callable(x)
303-func acceptWorkResult (u,an) = if (!(n(x.caller)))
304- then throw("grants working group access only")
305- else {
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)]))
310- }
311-
312-
313-
314-@Callable(x)
315-func rejectTask (u) = if (!(n(x.caller)))
316- then throw("grants working group access only")
317- else WriteSet([DataEntry((("tasks_" + u) + "_status"), "rejected")])
328+@Callable(F)
329+func rejectTask (u) = if (n(F.caller))
330+ then WriteSet([DataEntry((("tasks_" + u) + "_status"), "rejected")])
331+ else throw("grants working group access only")
318332
319333
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
146-@Callable(x)
147-func addTask (y,z) = if (s(x.caller))
148- then WriteSet([DataEntry((("tasks_" + toBase58String(x.transactionId)) + "_title"), y), DataEntry((("tasks_" + toBase58String(x.transactionId)) + "_link"), z)])
146+func x (j,u) = if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
147+ then throw("This grant has not yet been approved")
148+ else true
149+
150+
151+func y (j,u,z) = {
152+ let A = (drop(toString(j), 10) + drop(z, 10))
153+ if ((h((("tasks_" + u) + "_status")) != "ready_to_apply"))
154+ then throw("This grant has not yet been approved")
155+ else if ((c(((("tasks_" + u) + "_vote_") + A)) != 0))
156+ then throw("you have already voted on this team")
157+ else true
158+ }
159+
160+
161+func B (j,u,C) = if (!(n(j)))
162+ then throw("grants working group access only")
163+ else if ((size(C) == 0))
164+ then throw("No one has yet responded to the grant")
165+ else true
166+
167+
168+func D (j,u,z) = if ((toString(j) != h((((("tasks_" + u) + "_app_") + z) + "_leader"))))
169+ then throw("team leader only")
170+ else true
171+
172+
173+func E (j,u) = if (!(n(j)))
174+ then throw("grants working group access only")
175+ else true
176+
177+
178+@Callable(F)
179+func addTask (G,H) = if (s(F.caller))
180+ then WriteSet([DataEntry((("tasks_" + toBase58String(F.transactionId)) + "_title"), G), DataEntry((("tasks_" + toBase58String(F.transactionId)) + "_link"), H)])
149181 else throw("checks are not passed")
150182
151183
152184
153-@Callable(x)
154-func addReward (u) = if (t(x.caller, u))
185+@Callable(F)
186+func addReward (u) = if (t(F.caller, u))
155187 then {
156- let A = extract(x.payment).amount
157- WriteSet([DataEntry((("tasks_" + u) + "_reward"), A), DataEntry((("tasks_" + u) + "_status"), "proposed")])
188+ let I = extract(F.payment).amount
189+ WriteSet([DataEntry((("tasks_" + u) + "_reward"), I), DataEntry((("tasks_" + u) + "_status"), "proposed")])
158190 }
159191 else throw("checks are not passed")
160192
161193
162194
163-@Callable(x)
164-func voteForTaskProposal (u,B) = if (v(x.caller, u))
195+@Callable(F)
196+func voteForTaskProposal (u,J) = if (v(F.caller, u))
165197 then {
166- let C = ((("tasks_" + u) + "_voted_") + toString(x.caller))
167- let D = (("tasks_" + u) + "_voting_state")
168- let E = c(D)
169- let F = (("tasks_" + u) + "_voting_amount")
170- let G = (c(D) + 1)
171- let H = q(B)
172- let I = (E + H)
173- WriteSet([DataEntry(D, I), DataEntry(C, H), DataEntry(F, G)])
198+ let K = ((("tasks_" + u) + "_voted_") + toString(F.caller))
199+ let L = (("tasks_" + u) + "_voting_state")
200+ let M = c(L)
201+ let N = (("tasks_" + u) + "_voting_amount")
202+ let O = (c(L) + 1)
203+ let P = q(J)
204+ let Q = (M + P)
205+ WriteSet([DataEntry(L, Q), DataEntry(K, P), DataEntry(N, O)])
174206 }
175207 else throw("checks are not passed")
176208
177209
178210
179-@Callable(x)
180-func finishTaskProposalVoting (u) = if (w(x.caller, u))
211+@Callable(F)
212+func finishTaskProposalVoting (u) = if (w(F.caller, u))
181213 then {
182- let D = (("tasks_" + u) + "_voting_state")
183- WriteSet([DataEntry((("tasks_" + u) + "_status"), if ((c(D) > 0))
214+ let L = (("tasks_" + u) + "_voting_state")
215+ WriteSet([DataEntry((("tasks_" + u) + "_status"), if ((c(L) > 0))
184216 then "ready_to_apply"
185217 else "rejected")])
186218 }
187219 else throw("checks are not passed")
188220
189221
190222
191-@Callable(x)
192-func applyForTask (u,J,z) = {
193- let K = h((("tasks_" + u) + "_status"))
194- if ((K != "ready_to_apply"))
195- then throw("This grant has not yet been approved")
196- else {
197- let L = (("tasks_" + u) + "_applicants")
198- let M = h(L)
199- let N = drop(toString(x.caller), 10)
200- let O = ((M + ";") + toString(x.caller))
201- WriteSet([DataEntry((((("tasks_" + u) + "_app_") + N) + "_name"), J), DataEntry((((("tasks_" + u) + "_app_") + N) + "_link"), z), DataEntry((((("tasks_" + u) + "_app_") + N) + "_leader"), toString(x.caller)), DataEntry((((("tasks_" + u) + "_app_") + N) + "_id"), N), DataEntry(L, O)])
223+@Callable(F)
224+func applyForTask (u,R,H) = if (x(F.caller, u))
225+ then {
226+ let S = (("tasks_" + u) + "_applicants")
227+ let T = h(S)
228+ let z = drop(toString(F.caller), 10)
229+ let U = ((T + ";") + toString(F.caller))
230+ WriteSet([DataEntry((((("tasks_" + u) + "_app_") + z) + "_name"), R), DataEntry((((("tasks_" + u) + "_app_") + z) + "_link"), H), DataEntry((((("tasks_" + u) + "_app_") + z) + "_leader"), toString(F.caller)), DataEntry((((("tasks_" + u) + "_app_") + z) + "_id"), z), DataEntry(S, U)])
231+ }
232+ else throw("checks are not passed")
233+
234+
235+
236+@Callable(F)
237+func voteForApplicant (u,z,J) = if (y(F.caller, u, z))
238+ then {
239+ let S = (((("tasks_" + u) + "_app_") + z) + "_voted")
240+ let U = ((h(S) + ";") + toString(F.caller))
241+ let A = (drop(toString(F.caller), 20) + z)
242+ let K = ((("tasks_" + u) + "_vh_") + A)
243+ if ((h(K) == toString(F.caller)))
244+ then throw("you have already voted on this team")
245+ else {
246+ let V = (((("tasks_" + u) + "_app_") + z) + "_votes")
247+ let W = (((("tasks_" + u) + "_app_") + z) + "_score")
248+ let X = (1 + c(V))
249+ let Y = (q(J) + c(W))
250+ WriteSet([DataEntry(S, U), DataEntry(K, toString(F.caller)), DataEntry(V, X), DataEntry(W, Y)])
251+ }
252+ }
253+ else throw("checks are not passed")
254+
255+
256+
257+@Callable(F)
258+func finishApplicantsVoting (u) = {
259+ func Z (aa,ab) = {
260+ let S = (("tasks_" + u) + "_applicants")
261+ let C = split(getStringValue(this, S), ";")
262+ let z = C[aa]
263+ let V = (((("tasks_" + u) + "_app_") + z) + "_votes")
264+ let X = c(V)
265+ let ac = C[ab]
266+ let ad = (((("tasks_" + u) + "_app_") + ac) + "_votes")
267+ let ae = c(ad)
268+ if ((X > ae))
269+ then aa
270+ else ab
271+ }
272+
273+ let af = h((("tasks_" + u) + "_applicants"))
274+ let C = split(af, ";")
275+ if (B(F.caller, u, C))
276+ then {
277+ let ag = {
278+ let ah = [0, 1]
279+ let ai = size(ah)
280+ let aj = 0
281+ if ((ai == 0))
282+ then aj
283+ else {
284+ let ak = Z(aj, ah[0])
285+ if ((ai == 1))
286+ then ak
287+ else {
288+ let al = Z(ak, ah[1])
289+ if ((ai == 2))
290+ then al
291+ else {
292+ let am = Z(al, ah[2])
293+ throw("List size exceed 2")
294+ }
295+ }
296+ }
297+ }
298+ let z = drop(C[ag], 20)
299+ WriteSet([DataEntry((("tasks_" + u) + "_status"), "team_chosen"), DataEntry((("tasks_" + u) + "_performer"), z), DataEntry((((("tasks_" + u) + "_app_") + z) + "_process"), "can_begin")])
202300 }
301+ else throw("checks are not passed")
203302 }
204303
205304
206305
207-@Callable(x)
208-func voteForApplicant (u,P,B) = if (!(p(x.caller)))
209- then throw("you can't vote")
210- else {
211- let Q = (drop(toString(x.caller), 10) + drop(P, 10))
212- let C = ((("tasks_" + u) + "_vote_") + Q)
213- let R = c(C)
214- if ((R != 0))
215- then throw("you have already voted on this team")
216- else {
217- let S = q(B)
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(C, S), DataEntry(U, W)])
223- }
224- }
225-
226-
227-
228-@Callable(x)
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))
237- then 1
238- else throw(("not enough votes to make decision on " + P))
239- }
240-
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
253- }
254-
255- if (!(n(x.caller)))
256- then throw("grants working group access only")
257- else {
258- let af = h((("tasks_" + u) + "_applicants"))
259- let aa = split(af, ";")
260- if ((size(aa) == 0))
261- then throw("No one has yet responded to the grant")
262- else {
263- let ag = {
264- let ah = [0, 1]
265- let ai = size(ah)
266- let aj = 0
267- if ((ai == 0))
268- then aj
269- else {
270- let ak = ab(aj, ah[0])
271- if ((ai == 1))
272- then ak
273- else {
274- let al = ab(ak, ah[1])
275- if ((ai == 2))
276- then al
277- else {
278- let am = ab(al, ah[2])
279- throw("List size exceed 2")
280- }
281- }
282- }
283- }
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")])
286- }
287- }
306+@Callable(F)
307+func startWork (u) = {
308+ let z = h((("tasks_" + u) + "_performer"))
309+ if (D(F.caller, u, z))
310+ then WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_started"), DataEntry((((("tasks_" + u) + "_app_") + z) + "_process"), "work_started")])
311+ else throw("checks are not passed")
288312 }
289313
290314
291315
292-@Callable(x)
293-func startWork (u) = {
294- let P = getStringValue(this, (("tasks_" + u) + "_performer"))
295- if ((toString(x.caller) != getStringValue(this, (((("tasks_" + u) + "_app_") + P) + "_leader"))))
296- then throw("team leader only")
297- else WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_started"), DataEntry((((("tasks_" + u) + "_app_") + P) + "_process"), "work_started")])
298- }
316+@Callable(F)
317+func acceptWorkResult (u,an) = if (E(F.caller, u))
318+ then {
319+ let ao = c((("tasks_" + u) + "_reward"))
320+ let z = h((("tasks_" + u) + "_performer"))
321+ let ap = h((((("tasks_" + u) + "_app_") + z) + "_leader"))
322+ ScriptResult(WriteSet([DataEntry((("tasks_" + u) + "_status"), "work_finished"), DataEntry((((("tasks_" + u) + "_app_") + z) + "_process"), "work_finished"), DataEntry((("tasks_" + u) + "_report"), an)]), TransferSet([ScriptTransfer(addressFromStringValue(ap), ao, unit)]))
323+ }
324+ else throw("checks are not passed")
299325
300326
301327
302-@Callable(x)
303-func acceptWorkResult (u,an) = if (!(n(x.caller)))
304- then throw("grants working group access only")
305- else {
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)]))
310- }
311-
312-
313-
314-@Callable(x)
315-func rejectTask (u) = if (!(n(x.caller)))
316- then throw("grants working group access only")
317- else WriteSet([DataEntry((("tasks_" + u) + "_status"), "rejected")])
328+@Callable(F)
329+func rejectTask (u) = if (n(F.caller))
330+ then WriteSet([DataEntry((("tasks_" + u) + "_status"), "rejected")])
331+ else throw("grants working group access only")
318332
319333

github/deemru/w8io/169f3d6 
217.85 ms