tx · BYsmCg8T4tZSR3zp2433bUFxWUdCUva5CeBRe2Q9yoky 3MutoJzdTrUrDBhCu1qU6FRgAADLadZEL9D: -0.10000000 Waves 2020.12.21 18:53 [1318658] smart account 3MutoJzdTrUrDBhCu1qU6FRgAADLadZEL9D > SELF 0.00000000 Waves
{ "type": 13, "id": "BYsmCg8T4tZSR3zp2433bUFxWUdCUva5CeBRe2Q9yoky", "fee": 10000000, "feeAssetId": null, "timestamp": 1608566012558, "version": 2, "chainId": 84, "sender": "3MutoJzdTrUrDBhCu1qU6FRgAADLadZEL9D", "senderPublicKey": "AwtL5awdRAD38g4rSetUxgc11P6TfxbJg11rKmX4hXSo", "proofs": [ "orA6vNymETETiV2GeGGDdkMQVydECoDtzXbEu1FNNo8Z985G56JQCpJyBCtUZ3LA1uoaBLrMd5Q5x8i7VrfQTw9" ], "script": "base64:AAIDAAAAAAAAAE8IARIECgIICBIDCgEIEgQKAggBEgMKAQgSBQoDCAgIEgUKAwgIARIDCgEIEgQKAggIEgQKAggIEgMKAQgSBQoDCAgBEgUKAwgICBIDCgEIAAAACQAAAAAGUVVPUlVNAAAAAAAAAAABAAAAAAxtYWluQ29udHJhY3QJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM013UnppMkJtcVpaWFdyQ0dDd2NSUUxzbmljMkFvZDZ6aFMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAA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AJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAAEHdpbm5lcklkZW50aWZpZXICAAAACF9wcm9jZXNzAgAAAAZ3aW5uZXIJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3JlcG9ydAUAAAAKcmVwb3J0TGluawUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAALdGVhbUFkZHJlc3MFAAAADHJld2FyZEFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAWkBAAAACnJlamVjdFRhc2sAAAABAAAABnRhc2tJZAMJAQAAAAEhAAAAAQkBAAAADWlzR3JvdXBNZW1iZXIAAAABCAUAAAABaQAAAAZjYWxsZXIJAAACAAAAAQIAAAAgZ3JhbnRzIHdvcmtpbmcgZ3JvdXAgYWNjZXNzIG9ubHkJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3N0YXR1cwIAAAAIcmVqZWN0ZWQFAAAAA25pbAAAAAC44eTp", "height": 1318658, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BBtMhjpePdyyrfCNYYkUuFe5AKifYq7vaeMdJqfQhQNU Next: B3it3JNP6p6nrt9qJgAek1mE6iXA28uPFNu9CpRBp7Ds Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1 | |
5 | 5 | ||
6 | - | func b (c) = { | |
7 | - | let d = { | |
8 | - | let e = getInteger(this, c) | |
9 | - | if ($isInstanceOf(e, "Int")) | |
6 | + | let b = addressFromStringValue("3MwRzi2BmqZZXWrCGCwcRQLsnic2Aod6zhS") | |
7 | + | ||
8 | + | func c (d) = { | |
9 | + | let e = { | |
10 | + | let f = getInteger(this, d) | |
11 | + | if ($isInstanceOf(f, "Int")) | |
10 | 12 | then { | |
11 | - | let | |
12 | - | | |
13 | + | let g = f | |
14 | + | g | |
13 | 15 | } | |
14 | 16 | else 0 | |
15 | 17 | } | |
16 | - | | |
18 | + | e | |
17 | 19 | } | |
18 | 20 | ||
19 | 21 | ||
20 | - | func | |
21 | - | let | |
22 | - | let | |
23 | - | if ($isInstanceOf( | |
22 | + | func h (d) = { | |
23 | + | let e = { | |
24 | + | let f = getString(this, d) | |
25 | + | if ($isInstanceOf(f, "String")) | |
24 | 26 | then { | |
25 | - | let | |
26 | - | | |
27 | + | let g = f | |
28 | + | g | |
27 | 29 | } | |
28 | 30 | else "" | |
29 | 31 | } | |
30 | - | | |
32 | + | e | |
31 | 33 | } | |
32 | 34 | ||
33 | 35 | ||
34 | - | let h = addressFromStringValue("3NCsqf4pFGtECs3vM4j1nKqL6VA3HdiNGeZ") | |
35 | - | ||
36 | 36 | func i () = { | |
37 | - | let | |
38 | - | let | |
39 | - | if ($isInstanceOf( | |
37 | + | let e = { | |
38 | + | let f = getString(b, "working_group_members") | |
39 | + | if ($isInstanceOf(f, "String")) | |
40 | 40 | then { | |
41 | - | let | |
42 | - | | |
41 | + | let g = f | |
42 | + | g | |
43 | 43 | } | |
44 | 44 | else "" | |
45 | 45 | } | |
46 | - | | |
46 | + | e | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func j () = { | |
51 | - | let | |
52 | - | let | |
53 | - | if ($isInstanceOf( | |
51 | + | let e = { | |
52 | + | let f = getString(b, "dao_members") | |
53 | + | if ($isInstanceOf(f, "String")) | |
54 | 54 | then { | |
55 | - | let | |
56 | - | | |
55 | + | let g = f | |
56 | + | g | |
57 | 57 | } | |
58 | 58 | else "" | |
59 | 59 | } | |
60 | - | | |
60 | + | e | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func k () = { | |
65 | - | let | |
66 | - | let | |
67 | - | if ($isInstanceOf( | |
65 | + | let e = { | |
66 | + | let f = getInteger(b, "dao_size") | |
67 | + | if ($isInstanceOf(f, "Int")) | |
68 | 68 | then { | |
69 | - | let | |
70 | - | | |
69 | + | let g = f | |
70 | + | g | |
71 | 71 | } | |
72 | 72 | else 0 | |
73 | 73 | } | |
74 | - | | |
74 | + | e | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func l (m) = { | |
79 | - | let | |
80 | - | let | |
81 | - | if ($isInstanceOf( | |
79 | + | let e = { | |
80 | + | let f = getInteger(b, (("working_group_member_" + toString(m)) + "_weight")) | |
81 | + | if ($isInstanceOf(f, "Int")) | |
82 | 82 | then { | |
83 | - | let | |
84 | - | | |
83 | + | let g = f | |
84 | + | g | |
85 | 85 | } | |
86 | 86 | else 0 | |
87 | 87 | } | |
88 | - | ( | |
88 | + | (e > 0) | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func n (o) = { | |
93 | - | let | |
94 | - | let | |
95 | - | if ($isInstanceOf( | |
93 | + | let e = { | |
94 | + | let f = getInteger(b, (("dao_member_" + toString(o.caller)) + "_weight")) | |
95 | + | if ($isInstanceOf(f, "Int")) | |
96 | 96 | then { | |
97 | - | let | |
98 | - | | |
97 | + | let g = f | |
98 | + | g | |
99 | 99 | } | |
100 | 100 | else 0 | |
101 | 101 | } | |
102 | - | ( | |
102 | + | (e > 0) | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
131 | 131 | then throw("you need to vote 1 or -1") | |
132 | 132 | else { | |
133 | 133 | let u = ((("tasks_" + r) + "_voted_") + toString(o.caller)) | |
134 | - | let v = | |
134 | + | let v = c(u) | |
135 | 135 | if (!((v == 0))) | |
136 | 136 | then throw("you have already voted") | |
137 | 137 | else { | |
138 | 138 | let w = (("tasks_" + r) + "_voting_state") | |
139 | - | let x = | |
139 | + | let x = c(w) | |
140 | 140 | let y = (("tasks_" + r) + "_voting_amount") | |
141 | - | let z = ( | |
141 | + | let z = (c(w) + 1) | |
142 | 142 | let A = (x + t) | |
143 | 143 | ScriptResult(WriteSet([DataEntry(w, A), DataEntry(u, t), DataEntry(y, z)]), TransferSet([ScriptTransfer(o.caller, 500000, unit)])) | |
144 | 144 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | @Callable(o) | |
150 | - | func finishTaskProposalVoting (r) = if ((a > (( | |
150 | + | func finishTaskProposalVoting (r) = if ((a > ((c((("tasks_" + r) + "_voting_amount")) * 100) / k()))) | |
151 | 151 | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
152 | 152 | else if (!(l(o.caller))) | |
153 | 153 | then throw("grants working group access only") | |
154 | 154 | else { | |
155 | 155 | let w = (("tasks_" + r) + "_voting_state") | |
156 | - | let x = | |
156 | + | let x = c(w) | |
157 | 157 | if ((x > 0)) | |
158 | 158 | then { | |
159 | 159 | let B = "ready_to_apply" | |
169 | 169 | ||
170 | 170 | @Callable(o) | |
171 | 171 | func applyForTask (r,C,q) = { | |
172 | - | let D = | |
172 | + | let D = h((("tasks_" + r) + "_status")) | |
173 | 173 | if ((D != "ready_to_apply")) | |
174 | 174 | then throw("This grant has not yet been approved") | |
175 | 175 | else { | |
176 | 176 | let E = (("tasks_" + r) + "_applicants") | |
177 | - | let F = | |
177 | + | let F = h(E) | |
178 | 178 | let G = drop(toString(o.caller), 10) | |
179 | 179 | let H = toString(o.caller) | |
180 | 180 | let I = ((F + ";") + H) | |
190 | 190 | else { | |
191 | 191 | let K = (drop(toString(o.caller), 10) + drop(J, 10)) | |
192 | 192 | let u = ((("tasks_" + r) + "_vote_") + K) | |
193 | - | let L = | |
193 | + | let L = c(u) | |
194 | 194 | if ((L != 0)) | |
195 | 195 | then throw("you have already voted on this team") | |
196 | 196 | else { | |
197 | 197 | let M = (((("tasks_" + r) + "_app_") + J) + "_votes") | |
198 | 198 | let N = (((("tasks_" + r) + "_app_") + J) + "_score") | |
199 | - | let O = (1 + | |
200 | - | let P = (t + | |
199 | + | let O = (1 + c(M)) | |
200 | + | let P = (t + c(N)) | |
201 | 201 | WriteSet([DataEntry(u, t), DataEntry(N, P)]) | |
202 | 202 | } | |
203 | 203 | } | |
210 | 210 | if (!(l(o.caller))) | |
211 | 211 | then throw("grants working group access only") | |
212 | 212 | else { | |
213 | - | let R = | |
213 | + | let R = h((("tasks_" + r) + "_applicants")) | |
214 | 214 | let S = split(R, ";") | |
215 | 215 | if ((size(S) == 0)) | |
216 | 216 | then throw("No one has applied to the hackathon, yet") | |
229 | 229 | ||
230 | 230 | @Callable(o) | |
231 | 231 | func submitSolution (r,U) = { | |
232 | - | func V (r) = ( | |
232 | + | func V (r) = (h((("tasks_" + r) + "_status")) == "work_started") | |
233 | 233 | ||
234 | 234 | let J = getStringValue(this, (("tasks_" + r) + "_performer")) | |
235 | 235 | if (!(V(r))) | |
257 | 257 | else { | |
258 | 258 | let K = (drop(toString(o.caller), 10) + drop(J, 10)) | |
259 | 259 | let u = ((("tasks_" + r) + "_solutionvote_") + K) | |
260 | - | let L = | |
260 | + | let L = c(u) | |
261 | 261 | if ((L != 0)) | |
262 | 262 | then throw("you have already voted on this solution") | |
263 | 263 | else { | |
264 | 264 | let M = (((("tasks_" + r) + "_app_") + J) + "_solutionvotes") | |
265 | 265 | let N = (((("tasks_" + r) + "_app_") + J) + "_solutionscore") | |
266 | - | let O = (1 + | |
267 | - | let P = (t + | |
266 | + | let O = (1 + c(M)) | |
267 | + | let P = (t + c(N)) | |
268 | 268 | WriteSet([DataEntry(u, t), DataEntry(N, P)]) | |
269 | 269 | } | |
270 | 270 | } | |
276 | 276 | func acceptWorkResult (r,X,Y) = if (!(l(o.caller))) | |
277 | 277 | then throw("grants working group access only") | |
278 | 278 | else { | |
279 | - | let Z = | |
279 | + | let Z = c((("tasks_" + r) + "_reward")) | |
280 | 280 | let aa = getStringValue(this, (((("tasks_" + r) + "_app_") + X) + "_leader")) | |
281 | 281 | ScriptResult(WriteSet([DataEntry((("tasks_" + r) + "_status"), "work_finished"), DataEntry((((("tasks_" + r) + "_app_") + X) + "_process"), "winner"), DataEntry((("tasks_" + r) + "_report"), Y)]), TransferSet([ScriptTransfer(addressFromStringValue(aa), Z, unit)])) | |
282 | 282 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1 | |
5 | 5 | ||
6 | - | func b (c) = { | |
7 | - | let d = { | |
8 | - | let e = getInteger(this, c) | |
9 | - | if ($isInstanceOf(e, "Int")) | |
6 | + | let b = addressFromStringValue("3MwRzi2BmqZZXWrCGCwcRQLsnic2Aod6zhS") | |
7 | + | ||
8 | + | func c (d) = { | |
9 | + | let e = { | |
10 | + | let f = getInteger(this, d) | |
11 | + | if ($isInstanceOf(f, "Int")) | |
10 | 12 | then { | |
11 | - | let | |
12 | - | | |
13 | + | let g = f | |
14 | + | g | |
13 | 15 | } | |
14 | 16 | else 0 | |
15 | 17 | } | |
16 | - | | |
18 | + | e | |
17 | 19 | } | |
18 | 20 | ||
19 | 21 | ||
20 | - | func | |
21 | - | let | |
22 | - | let | |
23 | - | if ($isInstanceOf( | |
22 | + | func h (d) = { | |
23 | + | let e = { | |
24 | + | let f = getString(this, d) | |
25 | + | if ($isInstanceOf(f, "String")) | |
24 | 26 | then { | |
25 | - | let | |
26 | - | | |
27 | + | let g = f | |
28 | + | g | |
27 | 29 | } | |
28 | 30 | else "" | |
29 | 31 | } | |
30 | - | | |
32 | + | e | |
31 | 33 | } | |
32 | 34 | ||
33 | 35 | ||
34 | - | let h = addressFromStringValue("3NCsqf4pFGtECs3vM4j1nKqL6VA3HdiNGeZ") | |
35 | - | ||
36 | 36 | func i () = { | |
37 | - | let | |
38 | - | let | |
39 | - | if ($isInstanceOf( | |
37 | + | let e = { | |
38 | + | let f = getString(b, "working_group_members") | |
39 | + | if ($isInstanceOf(f, "String")) | |
40 | 40 | then { | |
41 | - | let | |
42 | - | | |
41 | + | let g = f | |
42 | + | g | |
43 | 43 | } | |
44 | 44 | else "" | |
45 | 45 | } | |
46 | - | | |
46 | + | e | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func j () = { | |
51 | - | let | |
52 | - | let | |
53 | - | if ($isInstanceOf( | |
51 | + | let e = { | |
52 | + | let f = getString(b, "dao_members") | |
53 | + | if ($isInstanceOf(f, "String")) | |
54 | 54 | then { | |
55 | - | let | |
56 | - | | |
55 | + | let g = f | |
56 | + | g | |
57 | 57 | } | |
58 | 58 | else "" | |
59 | 59 | } | |
60 | - | | |
60 | + | e | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func k () = { | |
65 | - | let | |
66 | - | let | |
67 | - | if ($isInstanceOf( | |
65 | + | let e = { | |
66 | + | let f = getInteger(b, "dao_size") | |
67 | + | if ($isInstanceOf(f, "Int")) | |
68 | 68 | then { | |
69 | - | let | |
70 | - | | |
69 | + | let g = f | |
70 | + | g | |
71 | 71 | } | |
72 | 72 | else 0 | |
73 | 73 | } | |
74 | - | | |
74 | + | e | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func l (m) = { | |
79 | - | let | |
80 | - | let | |
81 | - | if ($isInstanceOf( | |
79 | + | let e = { | |
80 | + | let f = getInteger(b, (("working_group_member_" + toString(m)) + "_weight")) | |
81 | + | if ($isInstanceOf(f, "Int")) | |
82 | 82 | then { | |
83 | - | let | |
84 | - | | |
83 | + | let g = f | |
84 | + | g | |
85 | 85 | } | |
86 | 86 | else 0 | |
87 | 87 | } | |
88 | - | ( | |
88 | + | (e > 0) | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func n (o) = { | |
93 | - | let | |
94 | - | let | |
95 | - | if ($isInstanceOf( | |
93 | + | let e = { | |
94 | + | let f = getInteger(b, (("dao_member_" + toString(o.caller)) + "_weight")) | |
95 | + | if ($isInstanceOf(f, "Int")) | |
96 | 96 | then { | |
97 | - | let | |
98 | - | | |
97 | + | let g = f | |
98 | + | g | |
99 | 99 | } | |
100 | 100 | else 0 | |
101 | 101 | } | |
102 | - | ( | |
102 | + | (e > 0) | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | @Callable(o) | |
107 | 107 | func addTask (p,q) = if (!(l(o.caller))) | |
108 | 108 | then throw("grants working group access only") | |
109 | 109 | else WriteSet([DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_title"), p), DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_link"), q)]) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | ||
113 | 113 | @Callable(o) | |
114 | 114 | func addReward (r) = if (!(l(o.caller))) | |
115 | 115 | then throw("grants working group access only") | |
116 | 116 | else { | |
117 | 117 | let s = extract(o.payment).amount | |
118 | 118 | WriteSet([DataEntry((("tasks_" + r) + "_reward"), s), DataEntry((("tasks_" + r) + "_status"), "proposed")]) | |
119 | 119 | } | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(o) | |
124 | 124 | func voteForTaskProposal (r,t) = if (!(n(o))) | |
125 | 125 | then throw("you can't vote") | |
126 | 126 | else if ((getStringValue(this, (("tasks_" + r) + "_status")) != "proposed")) | |
127 | 127 | then throw("voting is closed or not started") | |
128 | 128 | else if (if ((t != -1)) | |
129 | 129 | then (t != 1) | |
130 | 130 | else false) | |
131 | 131 | then throw("you need to vote 1 or -1") | |
132 | 132 | else { | |
133 | 133 | let u = ((("tasks_" + r) + "_voted_") + toString(o.caller)) | |
134 | - | let v = | |
134 | + | let v = c(u) | |
135 | 135 | if (!((v == 0))) | |
136 | 136 | then throw("you have already voted") | |
137 | 137 | else { | |
138 | 138 | let w = (("tasks_" + r) + "_voting_state") | |
139 | - | let x = | |
139 | + | let x = c(w) | |
140 | 140 | let y = (("tasks_" + r) + "_voting_amount") | |
141 | - | let z = ( | |
141 | + | let z = (c(w) + 1) | |
142 | 142 | let A = (x + t) | |
143 | 143 | ScriptResult(WriteSet([DataEntry(w, A), DataEntry(u, t), DataEntry(y, z)]), TransferSet([ScriptTransfer(o.caller, 500000, unit)])) | |
144 | 144 | } | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | ||
149 | 149 | @Callable(o) | |
150 | - | func finishTaskProposalVoting (r) = if ((a > (( | |
150 | + | func finishTaskProposalVoting (r) = if ((a > ((c((("tasks_" + r) + "_voting_amount")) * 100) / k()))) | |
151 | 151 | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
152 | 152 | else if (!(l(o.caller))) | |
153 | 153 | then throw("grants working group access only") | |
154 | 154 | else { | |
155 | 155 | let w = (("tasks_" + r) + "_voting_state") | |
156 | - | let x = | |
156 | + | let x = c(w) | |
157 | 157 | if ((x > 0)) | |
158 | 158 | then { | |
159 | 159 | let B = "ready_to_apply" | |
160 | 160 | WriteSet([DataEntry((("tasks_" + r) + "_status"), B)]) | |
161 | 161 | } | |
162 | 162 | else { | |
163 | 163 | let B = "rejected" | |
164 | 164 | WriteSet([DataEntry((("tasks_" + r) + "_status"), B)]) | |
165 | 165 | } | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | ||
170 | 170 | @Callable(o) | |
171 | 171 | func applyForTask (r,C,q) = { | |
172 | - | let D = | |
172 | + | let D = h((("tasks_" + r) + "_status")) | |
173 | 173 | if ((D != "ready_to_apply")) | |
174 | 174 | then throw("This grant has not yet been approved") | |
175 | 175 | else { | |
176 | 176 | let E = (("tasks_" + r) + "_applicants") | |
177 | - | let F = | |
177 | + | let F = h(E) | |
178 | 178 | let G = drop(toString(o.caller), 10) | |
179 | 179 | let H = toString(o.caller) | |
180 | 180 | let I = ((F + ";") + H) | |
181 | 181 | WriteSet([DataEntry((((("tasks_" + r) + "_app_") + G) + "_name"), C), DataEntry((((("tasks_" + r) + "_app_") + G) + "_link"), q), DataEntry((((("tasks_" + r) + "_app_") + G) + "_leader"), H), DataEntry((((("tasks_" + r) + "_app_") + G) + "_id"), G), DataEntry(E, I)]) | |
182 | 182 | } | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | ||
187 | 187 | @Callable(o) | |
188 | 188 | func voteForApplicant (r,J,t) = if (!(n(o))) | |
189 | 189 | then throw("you can't vote") | |
190 | 190 | else { | |
191 | 191 | let K = (drop(toString(o.caller), 10) + drop(J, 10)) | |
192 | 192 | let u = ((("tasks_" + r) + "_vote_") + K) | |
193 | - | let L = | |
193 | + | let L = c(u) | |
194 | 194 | if ((L != 0)) | |
195 | 195 | then throw("you have already voted on this team") | |
196 | 196 | else { | |
197 | 197 | let M = (((("tasks_" + r) + "_app_") + J) + "_votes") | |
198 | 198 | let N = (((("tasks_" + r) + "_app_") + J) + "_score") | |
199 | - | let O = (1 + | |
200 | - | let P = (t + | |
199 | + | let O = (1 + c(M)) | |
200 | + | let P = (t + c(N)) | |
201 | 201 | WriteSet([DataEntry(u, t), DataEntry(N, P)]) | |
202 | 202 | } | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | ||
207 | 207 | @Callable(o) | |
208 | 208 | func finishApplicantsVoting (r) = { | |
209 | 209 | let Q = 1 | |
210 | 210 | if (!(l(o.caller))) | |
211 | 211 | then throw("grants working group access only") | |
212 | 212 | else { | |
213 | - | let R = | |
213 | + | let R = h((("tasks_" + r) + "_applicants")) | |
214 | 214 | let S = split(R, ";") | |
215 | 215 | if ((size(S) == 0)) | |
216 | 216 | then throw("No one has applied to the hackathon, yet") | |
217 | 217 | else WriteSet([DataEntry((("tasks_" + r) + "_performer"), R), DataEntry((("tasks_" + r) + "_status"), "ready_to_submit")]) | |
218 | 218 | } | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | ||
223 | 223 | @Callable(o) | |
224 | 224 | func enableSubmissions (r,T) = if (!(l(o.caller))) | |
225 | 225 | then throw("grants working group access only") | |
226 | 226 | else WriteSet([DataEntry((("tasks_" + r) + "_status"), "work_started"), DataEntry((("tasks_" + r) + "_jury"), T)]) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | ||
230 | 230 | @Callable(o) | |
231 | 231 | func submitSolution (r,U) = { | |
232 | - | func V (r) = ( | |
232 | + | func V (r) = (h((("tasks_" + r) + "_status")) == "work_started") | |
233 | 233 | ||
234 | 234 | let J = getStringValue(this, (("tasks_" + r) + "_performer")) | |
235 | 235 | if (!(V(r))) | |
236 | 236 | then throw("not possible to upload solution now") | |
237 | 237 | else if ((toString(o.caller) != getStringValue(this, (((("tasks_" + r) + "_app_") + J) + "_leader")))) | |
238 | 238 | then throw("team leader only") | |
239 | 239 | else WriteSet([DataEntry((((("tasks_" + r) + "_app_") + J) + "_process"), "work_submitted"), DataEntry((((("tasks_" + r) + "_app_") + J) + "_solution"), U)]) | |
240 | 240 | } | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | ||
244 | 244 | @Callable(o) | |
245 | 245 | func stopSubmissions (r) = if (!(l(o.caller))) | |
246 | 246 | then throw("grants working group access only") | |
247 | 247 | else WriteSet([DataEntry((("tasks_" + r) + "_status"), "work_finished")]) | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | ||
251 | 251 | @Callable(o) | |
252 | 252 | func voteForSolution (r,J,t) = { | |
253 | 253 | func W (o,r) = true | |
254 | 254 | ||
255 | 255 | if (!(W(o, r))) | |
256 | 256 | then throw("you can't vote") | |
257 | 257 | else { | |
258 | 258 | let K = (drop(toString(o.caller), 10) + drop(J, 10)) | |
259 | 259 | let u = ((("tasks_" + r) + "_solutionvote_") + K) | |
260 | - | let L = | |
260 | + | let L = c(u) | |
261 | 261 | if ((L != 0)) | |
262 | 262 | then throw("you have already voted on this solution") | |
263 | 263 | else { | |
264 | 264 | let M = (((("tasks_" + r) + "_app_") + J) + "_solutionvotes") | |
265 | 265 | let N = (((("tasks_" + r) + "_app_") + J) + "_solutionscore") | |
266 | - | let O = (1 + | |
267 | - | let P = (t + | |
266 | + | let O = (1 + c(M)) | |
267 | + | let P = (t + c(N)) | |
268 | 268 | WriteSet([DataEntry(u, t), DataEntry(N, P)]) | |
269 | 269 | } | |
270 | 270 | } | |
271 | 271 | } | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | ||
275 | 275 | @Callable(o) | |
276 | 276 | func acceptWorkResult (r,X,Y) = if (!(l(o.caller))) | |
277 | 277 | then throw("grants working group access only") | |
278 | 278 | else { | |
279 | - | let Z = | |
279 | + | let Z = c((("tasks_" + r) + "_reward")) | |
280 | 280 | let aa = getStringValue(this, (((("tasks_" + r) + "_app_") + X) + "_leader")) | |
281 | 281 | ScriptResult(WriteSet([DataEntry((("tasks_" + r) + "_status"), "work_finished"), DataEntry((((("tasks_" + r) + "_app_") + X) + "_process"), "winner"), DataEntry((("tasks_" + r) + "_report"), Y)]), TransferSet([ScriptTransfer(addressFromStringValue(aa), Z, unit)])) | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | ||
286 | 286 | @Callable(o) | |
287 | 287 | func rejectTask (r) = if (!(l(o.caller))) | |
288 | 288 | then throw("grants working group access only") | |
289 | 289 | else WriteSet([DataEntry((("tasks_" + r) + "_status"), "rejected")]) | |
290 | 290 | ||
291 | 291 |
github/deemru/w8io/169f3d6 123.94 ms ◑