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