tx · 25pk9sPbXUGhnRhfTSbeWTuypf9KAQnPKdMi6HGtk2we 3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2: -0.01400000 Waves 2020.09.30 15:44 [1200060] smart account 3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2 > SELF 0.00000000 Waves
{ "type": 13, "id": "25pk9sPbXUGhnRhfTSbeWTuypf9KAQnPKdMi6HGtk2we", "fee": 1400000, "feeAssetId": null, "timestamp": 1601469895547, "version": 2, "chainId": 84, "sender": "3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2", "senderPublicKey": "3dxKqzB5AWentnFkyzLnbnRfN2iRWgE7Q4paMwfi9MoT", "proofs": [ "5wVLenmgxA8H5YmLyqcXRa1EyXooMJyme3UCYU18ZmqxxyjDgPG3JSxv3ejn8hTfS4SYnghfLf2DS7fpWHmBYkqc" ], "script": "base64:AAIDAAAAAAAAAEMIARIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIEgQKAggBEgMKAQgSBAoCCAgSBQoDCAgBEgMKAQgSAwoBCBIDCgEIAAAACAAAAAAGUVVPUlVNAAAAAAAAAAAyAAAAAAVXQ1RpZAEAAAAgO1kbDPy5xEIOvJ4v22ekSZz5VGdcetD16T0T8sRYgmMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAB2lzT3duZXIAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwEAAAAIZ2V0R3JvdXAAAAAABAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwIAAAANd29ya2luZ19ncm91cAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5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AAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAZ0YXNrSWQCAAAAC19hcHBsaWNhbnRfBQAAAAh0ZWFtTmFtZQIAAAANX3dvcmtfcHJvY2VzcwIAAAANd29ya19maW5pc2hlZAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAALdGVhbUFkZHJlc3MFAAAADHJld2FyZEFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAANu+qco=", "height": 1200060, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9eiYxMChRd2ijzayz4mSkRx4LzYLU3S46na2R2M1BUMQ Next: 5TpwqYSbWw3yrqV8taWPud8oKtC3j97perB4hoVJHTCt Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 50 | |
5 | 5 | ||
6 | - | func b (c) = { | |
7 | - | let d = { | |
8 | - | let e = getInteger(this, c) | |
9 | - | if ($isInstanceOf(e, "Int")) | |
6 | + | let b = base58'4zfrrwDVjbGFM8wxbZGriVLY4XJsVD4oNMp21FnDnMAa' | |
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 | |
22 | + | func h (i) = (i == this) | |
21 | 23 | ||
22 | 24 | ||
23 | - | func | |
24 | - | let | |
25 | - | let | |
26 | - | if ($isInstanceOf( | |
25 | + | func j () = { | |
26 | + | let e = { | |
27 | + | let f = getString(this, "working_group") | |
28 | + | if ($isInstanceOf(f, "String")) | |
27 | 29 | then { | |
28 | - | let | |
29 | - | | |
30 | + | let g = f | |
31 | + | g | |
30 | 32 | } | |
31 | 33 | else "" | |
32 | 34 | } | |
33 | - | | |
35 | + | e | |
34 | 36 | } | |
35 | 37 | ||
36 | 38 | ||
37 | - | func | |
38 | - | let | |
39 | - | let | |
40 | - | if ($isInstanceOf( | |
39 | + | func k () = { | |
40 | + | let e = { | |
41 | + | let f = getString(this, "dao_members") | |
42 | + | if ($isInstanceOf(f, "String")) | |
41 | 43 | then { | |
42 | - | let | |
43 | - | | |
44 | + | let g = f | |
45 | + | g | |
44 | 46 | } | |
45 | 47 | else "" | |
46 | 48 | } | |
47 | - | | |
49 | + | e | |
48 | 50 | } | |
49 | 51 | ||
50 | 52 | ||
51 | - | func | |
53 | + | func l (m) = (c(("group_member_weight_" + toString(m))) > 0) | |
52 | 54 | ||
53 | 55 | ||
54 | - | func | |
56 | + | func n (o) = (c(("dao_member_weight_" + toString(o.caller))) > 0) | |
55 | 57 | ||
56 | 58 | ||
57 | - | @Callable( | |
58 | - | func addDAOMember ( | |
59 | + | @Callable(o) | |
60 | + | func addDAOMember (p) = if (!(h(o.caller))) | |
59 | 61 | then throw("access only to the DAO owner") | |
60 | 62 | else { | |
61 | - | let | |
62 | - | let | |
63 | - | let | |
64 | - | let | |
65 | - | WriteSet([DataEntry("dao_members", | |
63 | + | let q = k() | |
64 | + | let r = ((q + ";") + p) | |
65 | + | let s = c("dao_size") | |
66 | + | let t = (s + 1) | |
67 | + | WriteSet([DataEntry("dao_members", r), DataEntry("dao_size", t), DataEntry(("dao_member_weight_" + p), 1)]) | |
66 | 68 | } | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | ||
70 | - | @Callable( | |
71 | - | func addGroupMember ( | |
72 | + | @Callable(o) | |
73 | + | func addGroupMember (p) = if (!(h(o.caller))) | |
72 | 74 | then throw("access only to the DAO owner") | |
73 | 75 | else { | |
74 | - | let | |
75 | - | let | |
76 | - | let | |
77 | - | let | |
78 | - | WriteSet([DataEntry("working_group", | |
76 | + | let q = j() | |
77 | + | let r = ((q + ";") + p) | |
78 | + | let s = c("working_group_size") | |
79 | + | let t = (s + 1) | |
80 | + | WriteSet([DataEntry("working_group", r), DataEntry("working_group_size", t), DataEntry(("group_member_weight_" + p), 1)]) | |
79 | 81 | } | |
80 | 82 | ||
81 | 83 | ||
82 | 84 | ||
83 | - | @Callable( | |
84 | - | func addTask ( | |
85 | + | @Callable(o) | |
86 | + | func addTask (u) = if (!(l(o.caller))) | |
85 | 87 | then throw("grants working group access only") | |
86 | - | else WriteSet([DataEntry((toBase58String( | |
88 | + | else WriteSet([DataEntry((toBase58String(o.transactionId) + "_task"), u)]) | |
87 | 89 | ||
88 | 90 | ||
89 | 91 | ||
90 | - | @Callable(n) | |
91 | - | func addTaskDetails (u) = if (!(k(n.caller))) | |
92 | - | then throw("grants working group access only") | |
92 | + | @Callable(o) | |
93 | + | func rateTask (v,w) = if (!(if ((w == 1)) | |
94 | + | then true | |
95 | + | else (w == -1))) | |
96 | + | then throw("your rate needs to be +1 or -1") | |
93 | 97 | else { | |
94 | - | let v = extract(n.payment).amount | |
95 | - | WriteSet([DataEntry((u + "_reward"), v), DataEntry((u + "_status"), "proposed")]) | |
98 | + | let x = extract(o.payment) | |
99 | + | if ((x.assetId != b)) | |
100 | + | then throw("you need to vote using WCT") | |
101 | + | else { | |
102 | + | let y = x.amount | |
103 | + | let z = (w * y) | |
104 | + | let A = c((v + "_community_rate")) | |
105 | + | ScriptResult(WriteSet([DataEntry((v + "_community_rate"), (A + z))]), TransferSet([ScriptTransfer(o.caller, x.amount, x.assetId)])) | |
106 | + | } | |
96 | 107 | } | |
97 | 108 | ||
98 | 109 | ||
99 | 110 | ||
100 | - | @Callable(n) | |
101 | - | func voteForTaskProposal (u,w) = if (!(m(n))) | |
111 | + | @Callable(o) | |
112 | + | func addTaskDetails (v) = if (!(l(o.caller))) | |
113 | + | then throw("grants working group access only") | |
114 | + | else { | |
115 | + | let B = extract(o.payment).amount | |
116 | + | WriteSet([DataEntry((v + "_reward"), B), DataEntry((v + "_status"), "proposed")]) | |
117 | + | } | |
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | @Callable(o) | |
122 | + | func voteForTaskProposal (v,C) = if (!(n(o))) | |
102 | 123 | then throw("you can't vote") | |
103 | - | else if ((getStringValue(this, ( | |
124 | + | else if ((getStringValue(this, (v + "_status")) != "proposed")) | |
104 | 125 | then throw("voting is closed or not started") | |
105 | - | else if (if (( | |
106 | - | then ( | |
126 | + | else if (if ((C != -1)) | |
127 | + | then (C != 1) | |
107 | 128 | else false) | |
108 | 129 | then throw("you need to vote 1 or -1") | |
109 | 130 | else { | |
110 | - | let | |
111 | - | let | |
112 | - | if (!(( | |
131 | + | let D = (((v + "_") + toString(o.caller)) + "_vote1") | |
132 | + | let E = c(D) | |
133 | + | if (!((E == 0))) | |
113 | 134 | then throw("you have already voted") | |
114 | 135 | else { | |
115 | - | let | |
116 | - | let | |
117 | - | let | |
118 | - | let | |
119 | - | let | |
120 | - | ScriptResult(WriteSet([DataEntry( | |
136 | + | let F = (v + "_voting1") | |
137 | + | let G = c(F) | |
138 | + | let H = (v + "_voting1_amount") | |
139 | + | let I = (c(F) + 1) | |
140 | + | let J = (G + C) | |
141 | + | ScriptResult(WriteSet([DataEntry(F, J), DataEntry(D, C), DataEntry(H, I)]), TransferSet([ScriptTransfer(o.caller, 500000, unit)])) | |
121 | 142 | } | |
122 | 143 | } | |
123 | 144 | ||
124 | 145 | ||
125 | 146 | ||
126 | - | @Callable( | |
127 | - | func finishTaskProposalVoting ( | |
147 | + | @Callable(o) | |
148 | + | func finishTaskProposalVoting (v) = if ((a > ((c((v + "_voting1_amount")) * 100) / c("dao_size")))) | |
128 | 149 | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
129 | - | else if (!( | |
150 | + | else if (!(l(o.caller))) | |
130 | 151 | then throw("grants working group access only") | |
131 | 152 | else { | |
132 | - | let | |
133 | - | let | |
134 | - | if (( | |
153 | + | let F = (v + "_voting1") | |
154 | + | let G = c(F) | |
155 | + | if ((G > 0)) | |
135 | 156 | then { | |
136 | - | let | |
137 | - | WriteSet([DataEntry(( | |
157 | + | let K = "ready_to_apply" | |
158 | + | WriteSet([DataEntry((v + "_status"), K)]) | |
138 | 159 | } | |
139 | 160 | else { | |
140 | - | let | |
141 | - | WriteSet([DataEntry(( | |
161 | + | let K = "rejected" | |
162 | + | WriteSet([DataEntry((v + "_status"), K)]) | |
142 | 163 | } | |
143 | 164 | } | |
144 | 165 | ||
145 | 166 | ||
146 | 167 | ||
147 | - | @Callable( | |
148 | - | func applyForTask ( | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | if ($isInstanceOf( | |
168 | + | @Callable(o) | |
169 | + | func applyForTask (v,L) = { | |
170 | + | let M = (v + "_applicants") | |
171 | + | let N = { | |
172 | + | let f = getString(this, M) | |
173 | + | if ($isInstanceOf(f, "String")) | |
153 | 174 | then { | |
154 | - | let | |
155 | - | | |
175 | + | let g = f | |
176 | + | g | |
156 | 177 | } | |
157 | 178 | else "" | |
158 | 179 | } | |
159 | - | let | |
160 | - | WriteSet([DataEntry(((( | |
180 | + | let O = ((N + ";") + L) | |
181 | + | WriteSet([DataEntry((((v + "_applicant_") + L) + "_leader"), toString(o.caller)), DataEntry(M, O)]) | |
161 | 182 | } | |
162 | 183 | ||
163 | 184 | ||
164 | 185 | ||
165 | - | @Callable( | |
166 | - | func voteForApplicant ( | |
186 | + | @Callable(o) | |
187 | + | func voteForApplicant (v,L,C) = if (!(n(o))) | |
167 | 188 | then throw("you can't vote") | |
168 | 189 | else { | |
169 | - | let | |
170 | - | let | |
171 | - | if (( | |
190 | + | let D = ((((v + "_") + toString(o.caller)) + "_vote_") + L) | |
191 | + | let z = c(D) | |
192 | + | if ((z != 0)) | |
172 | 193 | then throw("you have already voted on this team") | |
173 | 194 | else { | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
178 | - | WriteSet([DataEntry( | |
195 | + | let P = (((v + "_applicant_") + L) + "_votes") | |
196 | + | let Q = (((v + "_applicant_") + L) + "_score") | |
197 | + | let R = (1 + c(P)) | |
198 | + | let S = (C + c(Q)) | |
199 | + | WriteSet([DataEntry(D, C), DataEntry(Q, S)]) | |
179 | 200 | } | |
180 | 201 | } | |
181 | 202 | ||
182 | 203 | ||
183 | 204 | ||
184 | - | @Callable( | |
185 | - | func finishApplicantsVoting ( | |
186 | - | func | |
187 | - | let | |
188 | - | let | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if (( | |
205 | + | @Callable(o) | |
206 | + | func finishApplicantsVoting (v) = { | |
207 | + | func T (U,V) = { | |
208 | + | let M = (v + "_applicants") | |
209 | + | let W = split(getStringValue(this, M), ";") | |
210 | + | let L = W[U] | |
211 | + | let P = (((v + "_applicant_") + L) + "_votes") | |
212 | + | let R = c(P) | |
213 | + | if ((R > 0)) | |
193 | 214 | then 1 | |
194 | - | else throw(("not enough votes to make decision on " + | |
215 | + | else throw(("not enough votes to make decision on " + L)) | |
195 | 216 | } | |
196 | 217 | ||
197 | - | func | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | if (( | |
207 | - | then | |
208 | - | else | |
218 | + | func X (U,V) = { | |
219 | + | let M = (v + "_applicants") | |
220 | + | let W = split(getStringValue(this, M), ";") | |
221 | + | let L = W[U] | |
222 | + | let P = (((v + "_applicant_") + L) + "_votes") | |
223 | + | let R = c(P) | |
224 | + | let Y = W[V] | |
225 | + | let Z = (((v + "_applicant_") + Y) + "_votes") | |
226 | + | let aa = c(Z) | |
227 | + | if ((R > aa)) | |
228 | + | then U | |
229 | + | else V | |
209 | 230 | } | |
210 | 231 | ||
211 | - | if (!( | |
232 | + | if (!(l(o.caller))) | |
212 | 233 | then throw("grants working group access only") | |
213 | 234 | else { | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | if (( | |
219 | - | then | |
235 | + | let ab = { | |
236 | + | let ac = [0, 1] | |
237 | + | let ad = size(ac) | |
238 | + | let ae = 0 | |
239 | + | if ((ad == 0)) | |
240 | + | then ae | |
220 | 241 | else { | |
221 | - | let | |
222 | - | if (( | |
223 | - | then | |
242 | + | let af = X(ae, ac[0]) | |
243 | + | if ((ad == 1)) | |
244 | + | then af | |
224 | 245 | else { | |
225 | - | let | |
226 | - | if (( | |
227 | - | then | |
246 | + | let ag = X(af, ac[1]) | |
247 | + | if ((ad == 2)) | |
248 | + | then ag | |
228 | 249 | else { | |
229 | - | let | |
250 | + | let ah = X(ag, ac[2]) | |
230 | 251 | throw("List size exceed 2") | |
231 | 252 | } | |
232 | 253 | } | |
233 | 254 | } | |
234 | 255 | } | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | WriteSet([DataEntry(( | |
256 | + | let M = (v + "_applicants") | |
257 | + | let W = split(getStringValue(this, M), ";") | |
258 | + | let L = W[ab] | |
259 | + | WriteSet([DataEntry((v + "_status"), "team_chosen"), DataEntry((v + "_performer"), L), DataEntry((((v + "_applicant_") + L) + "_work_process"), "can_begin")]) | |
239 | 260 | } | |
240 | 261 | } | |
241 | 262 | ||
242 | 263 | ||
243 | 264 | ||
244 | - | @Callable( | |
245 | - | func startWork ( | |
246 | - | let | |
247 | - | if ((toString( | |
265 | + | @Callable(o) | |
266 | + | func startWork (v) = { | |
267 | + | let L = getStringValue(this, (v + "_performer")) | |
268 | + | if ((toString(o.caller) != getStringValue(this, (((v + "_applicant_") + L) + "_leader")))) | |
248 | 269 | then throw("team leader only") | |
249 | - | else WriteSet([DataEntry(( | |
270 | + | else WriteSet([DataEntry((v + "_status"), "work_started"), DataEntry((((v + "_applicant_") + L) + "_work_process"), "work_started")]) | |
250 | 271 | } | |
251 | 272 | ||
252 | 273 | ||
253 | 274 | ||
254 | - | @Callable( | |
255 | - | func acceptWorkResult ( | |
275 | + | @Callable(o) | |
276 | + | func acceptWorkResult (v) = if (!(l(o.caller))) | |
256 | 277 | then throw("grants working group access only") | |
257 | 278 | else { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | ScriptResult(WriteSet([DataEntry(( | |
279 | + | let ai = c((v + "_reward")) | |
280 | + | let L = getStringValue(this, (v + "_performer")) | |
281 | + | let aj = getStringValue(this, (((v + "_applicant_") + L) + "_leader")) | |
282 | + | ScriptResult(WriteSet([DataEntry((v + "_status"), "work_finished"), DataEntry((((v + "_applicant_") + L) + "_work_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(aj), ai, unit)])) | |
262 | 283 | } | |
263 | 284 | ||
264 | 285 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 50 | |
5 | 5 | ||
6 | - | func b (c) = { | |
7 | - | let d = { | |
8 | - | let e = getInteger(this, c) | |
9 | - | if ($isInstanceOf(e, "Int")) | |
6 | + | let b = base58'4zfrrwDVjbGFM8wxbZGriVLY4XJsVD4oNMp21FnDnMAa' | |
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 | |
22 | + | func h (i) = (i == this) | |
21 | 23 | ||
22 | 24 | ||
23 | - | func | |
24 | - | let | |
25 | - | let | |
26 | - | if ($isInstanceOf( | |
25 | + | func j () = { | |
26 | + | let e = { | |
27 | + | let f = getString(this, "working_group") | |
28 | + | if ($isInstanceOf(f, "String")) | |
27 | 29 | then { | |
28 | - | let | |
29 | - | | |
30 | + | let g = f | |
31 | + | g | |
30 | 32 | } | |
31 | 33 | else "" | |
32 | 34 | } | |
33 | - | | |
35 | + | e | |
34 | 36 | } | |
35 | 37 | ||
36 | 38 | ||
37 | - | func | |
38 | - | let | |
39 | - | let | |
40 | - | if ($isInstanceOf( | |
39 | + | func k () = { | |
40 | + | let e = { | |
41 | + | let f = getString(this, "dao_members") | |
42 | + | if ($isInstanceOf(f, "String")) | |
41 | 43 | then { | |
42 | - | let | |
43 | - | | |
44 | + | let g = f | |
45 | + | g | |
44 | 46 | } | |
45 | 47 | else "" | |
46 | 48 | } | |
47 | - | | |
49 | + | e | |
48 | 50 | } | |
49 | 51 | ||
50 | 52 | ||
51 | - | func | |
53 | + | func l (m) = (c(("group_member_weight_" + toString(m))) > 0) | |
52 | 54 | ||
53 | 55 | ||
54 | - | func | |
56 | + | func n (o) = (c(("dao_member_weight_" + toString(o.caller))) > 0) | |
55 | 57 | ||
56 | 58 | ||
57 | - | @Callable( | |
58 | - | func addDAOMember ( | |
59 | + | @Callable(o) | |
60 | + | func addDAOMember (p) = if (!(h(o.caller))) | |
59 | 61 | then throw("access only to the DAO owner") | |
60 | 62 | else { | |
61 | - | let | |
62 | - | let | |
63 | - | let | |
64 | - | let | |
65 | - | WriteSet([DataEntry("dao_members", | |
63 | + | let q = k() | |
64 | + | let r = ((q + ";") + p) | |
65 | + | let s = c("dao_size") | |
66 | + | let t = (s + 1) | |
67 | + | WriteSet([DataEntry("dao_members", r), DataEntry("dao_size", t), DataEntry(("dao_member_weight_" + p), 1)]) | |
66 | 68 | } | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | ||
70 | - | @Callable( | |
71 | - | func addGroupMember ( | |
72 | + | @Callable(o) | |
73 | + | func addGroupMember (p) = if (!(h(o.caller))) | |
72 | 74 | then throw("access only to the DAO owner") | |
73 | 75 | else { | |
74 | - | let | |
75 | - | let | |
76 | - | let | |
77 | - | let | |
78 | - | WriteSet([DataEntry("working_group", | |
76 | + | let q = j() | |
77 | + | let r = ((q + ";") + p) | |
78 | + | let s = c("working_group_size") | |
79 | + | let t = (s + 1) | |
80 | + | WriteSet([DataEntry("working_group", r), DataEntry("working_group_size", t), DataEntry(("group_member_weight_" + p), 1)]) | |
79 | 81 | } | |
80 | 82 | ||
81 | 83 | ||
82 | 84 | ||
83 | - | @Callable( | |
84 | - | func addTask ( | |
85 | + | @Callable(o) | |
86 | + | func addTask (u) = if (!(l(o.caller))) | |
85 | 87 | then throw("grants working group access only") | |
86 | - | else WriteSet([DataEntry((toBase58String( | |
88 | + | else WriteSet([DataEntry((toBase58String(o.transactionId) + "_task"), u)]) | |
87 | 89 | ||
88 | 90 | ||
89 | 91 | ||
90 | - | @Callable(n) | |
91 | - | func addTaskDetails (u) = if (!(k(n.caller))) | |
92 | - | then throw("grants working group access only") | |
92 | + | @Callable(o) | |
93 | + | func rateTask (v,w) = if (!(if ((w == 1)) | |
94 | + | then true | |
95 | + | else (w == -1))) | |
96 | + | then throw("your rate needs to be +1 or -1") | |
93 | 97 | else { | |
94 | - | let v = extract(n.payment).amount | |
95 | - | WriteSet([DataEntry((u + "_reward"), v), DataEntry((u + "_status"), "proposed")]) | |
98 | + | let x = extract(o.payment) | |
99 | + | if ((x.assetId != b)) | |
100 | + | then throw("you need to vote using WCT") | |
101 | + | else { | |
102 | + | let y = x.amount | |
103 | + | let z = (w * y) | |
104 | + | let A = c((v + "_community_rate")) | |
105 | + | ScriptResult(WriteSet([DataEntry((v + "_community_rate"), (A + z))]), TransferSet([ScriptTransfer(o.caller, x.amount, x.assetId)])) | |
106 | + | } | |
96 | 107 | } | |
97 | 108 | ||
98 | 109 | ||
99 | 110 | ||
100 | - | @Callable(n) | |
101 | - | func voteForTaskProposal (u,w) = if (!(m(n))) | |
111 | + | @Callable(o) | |
112 | + | func addTaskDetails (v) = if (!(l(o.caller))) | |
113 | + | then throw("grants working group access only") | |
114 | + | else { | |
115 | + | let B = extract(o.payment).amount | |
116 | + | WriteSet([DataEntry((v + "_reward"), B), DataEntry((v + "_status"), "proposed")]) | |
117 | + | } | |
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | @Callable(o) | |
122 | + | func voteForTaskProposal (v,C) = if (!(n(o))) | |
102 | 123 | then throw("you can't vote") | |
103 | - | else if ((getStringValue(this, ( | |
124 | + | else if ((getStringValue(this, (v + "_status")) != "proposed")) | |
104 | 125 | then throw("voting is closed or not started") | |
105 | - | else if (if (( | |
106 | - | then ( | |
126 | + | else if (if ((C != -1)) | |
127 | + | then (C != 1) | |
107 | 128 | else false) | |
108 | 129 | then throw("you need to vote 1 or -1") | |
109 | 130 | else { | |
110 | - | let | |
111 | - | let | |
112 | - | if (!(( | |
131 | + | let D = (((v + "_") + toString(o.caller)) + "_vote1") | |
132 | + | let E = c(D) | |
133 | + | if (!((E == 0))) | |
113 | 134 | then throw("you have already voted") | |
114 | 135 | else { | |
115 | - | let | |
116 | - | let | |
117 | - | let | |
118 | - | let | |
119 | - | let | |
120 | - | ScriptResult(WriteSet([DataEntry( | |
136 | + | let F = (v + "_voting1") | |
137 | + | let G = c(F) | |
138 | + | let H = (v + "_voting1_amount") | |
139 | + | let I = (c(F) + 1) | |
140 | + | let J = (G + C) | |
141 | + | ScriptResult(WriteSet([DataEntry(F, J), DataEntry(D, C), DataEntry(H, I)]), TransferSet([ScriptTransfer(o.caller, 500000, unit)])) | |
121 | 142 | } | |
122 | 143 | } | |
123 | 144 | ||
124 | 145 | ||
125 | 146 | ||
126 | - | @Callable( | |
127 | - | func finishTaskProposalVoting ( | |
147 | + | @Callable(o) | |
148 | + | func finishTaskProposalVoting (v) = if ((a > ((c((v + "_voting1_amount")) * 100) / c("dao_size")))) | |
128 | 149 | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
129 | - | else if (!( | |
150 | + | else if (!(l(o.caller))) | |
130 | 151 | then throw("grants working group access only") | |
131 | 152 | else { | |
132 | - | let | |
133 | - | let | |
134 | - | if (( | |
153 | + | let F = (v + "_voting1") | |
154 | + | let G = c(F) | |
155 | + | if ((G > 0)) | |
135 | 156 | then { | |
136 | - | let | |
137 | - | WriteSet([DataEntry(( | |
157 | + | let K = "ready_to_apply" | |
158 | + | WriteSet([DataEntry((v + "_status"), K)]) | |
138 | 159 | } | |
139 | 160 | else { | |
140 | - | let | |
141 | - | WriteSet([DataEntry(( | |
161 | + | let K = "rejected" | |
162 | + | WriteSet([DataEntry((v + "_status"), K)]) | |
142 | 163 | } | |
143 | 164 | } | |
144 | 165 | ||
145 | 166 | ||
146 | 167 | ||
147 | - | @Callable( | |
148 | - | func applyForTask ( | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | if ($isInstanceOf( | |
168 | + | @Callable(o) | |
169 | + | func applyForTask (v,L) = { | |
170 | + | let M = (v + "_applicants") | |
171 | + | let N = { | |
172 | + | let f = getString(this, M) | |
173 | + | if ($isInstanceOf(f, "String")) | |
153 | 174 | then { | |
154 | - | let | |
155 | - | | |
175 | + | let g = f | |
176 | + | g | |
156 | 177 | } | |
157 | 178 | else "" | |
158 | 179 | } | |
159 | - | let | |
160 | - | WriteSet([DataEntry(((( | |
180 | + | let O = ((N + ";") + L) | |
181 | + | WriteSet([DataEntry((((v + "_applicant_") + L) + "_leader"), toString(o.caller)), DataEntry(M, O)]) | |
161 | 182 | } | |
162 | 183 | ||
163 | 184 | ||
164 | 185 | ||
165 | - | @Callable( | |
166 | - | func voteForApplicant ( | |
186 | + | @Callable(o) | |
187 | + | func voteForApplicant (v,L,C) = if (!(n(o))) | |
167 | 188 | then throw("you can't vote") | |
168 | 189 | else { | |
169 | - | let | |
170 | - | let | |
171 | - | if (( | |
190 | + | let D = ((((v + "_") + toString(o.caller)) + "_vote_") + L) | |
191 | + | let z = c(D) | |
192 | + | if ((z != 0)) | |
172 | 193 | then throw("you have already voted on this team") | |
173 | 194 | else { | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
178 | - | WriteSet([DataEntry( | |
195 | + | let P = (((v + "_applicant_") + L) + "_votes") | |
196 | + | let Q = (((v + "_applicant_") + L) + "_score") | |
197 | + | let R = (1 + c(P)) | |
198 | + | let S = (C + c(Q)) | |
199 | + | WriteSet([DataEntry(D, C), DataEntry(Q, S)]) | |
179 | 200 | } | |
180 | 201 | } | |
181 | 202 | ||
182 | 203 | ||
183 | 204 | ||
184 | - | @Callable( | |
185 | - | func finishApplicantsVoting ( | |
186 | - | func | |
187 | - | let | |
188 | - | let | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if (( | |
205 | + | @Callable(o) | |
206 | + | func finishApplicantsVoting (v) = { | |
207 | + | func T (U,V) = { | |
208 | + | let M = (v + "_applicants") | |
209 | + | let W = split(getStringValue(this, M), ";") | |
210 | + | let L = W[U] | |
211 | + | let P = (((v + "_applicant_") + L) + "_votes") | |
212 | + | let R = c(P) | |
213 | + | if ((R > 0)) | |
193 | 214 | then 1 | |
194 | - | else throw(("not enough votes to make decision on " + | |
215 | + | else throw(("not enough votes to make decision on " + L)) | |
195 | 216 | } | |
196 | 217 | ||
197 | - | func | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | if (( | |
207 | - | then | |
208 | - | else | |
218 | + | func X (U,V) = { | |
219 | + | let M = (v + "_applicants") | |
220 | + | let W = split(getStringValue(this, M), ";") | |
221 | + | let L = W[U] | |
222 | + | let P = (((v + "_applicant_") + L) + "_votes") | |
223 | + | let R = c(P) | |
224 | + | let Y = W[V] | |
225 | + | let Z = (((v + "_applicant_") + Y) + "_votes") | |
226 | + | let aa = c(Z) | |
227 | + | if ((R > aa)) | |
228 | + | then U | |
229 | + | else V | |
209 | 230 | } | |
210 | 231 | ||
211 | - | if (!( | |
232 | + | if (!(l(o.caller))) | |
212 | 233 | then throw("grants working group access only") | |
213 | 234 | else { | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | if (( | |
219 | - | then | |
235 | + | let ab = { | |
236 | + | let ac = [0, 1] | |
237 | + | let ad = size(ac) | |
238 | + | let ae = 0 | |
239 | + | if ((ad == 0)) | |
240 | + | then ae | |
220 | 241 | else { | |
221 | - | let | |
222 | - | if (( | |
223 | - | then | |
242 | + | let af = X(ae, ac[0]) | |
243 | + | if ((ad == 1)) | |
244 | + | then af | |
224 | 245 | else { | |
225 | - | let | |
226 | - | if (( | |
227 | - | then | |
246 | + | let ag = X(af, ac[1]) | |
247 | + | if ((ad == 2)) | |
248 | + | then ag | |
228 | 249 | else { | |
229 | - | let | |
250 | + | let ah = X(ag, ac[2]) | |
230 | 251 | throw("List size exceed 2") | |
231 | 252 | } | |
232 | 253 | } | |
233 | 254 | } | |
234 | 255 | } | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | WriteSet([DataEntry(( | |
256 | + | let M = (v + "_applicants") | |
257 | + | let W = split(getStringValue(this, M), ";") | |
258 | + | let L = W[ab] | |
259 | + | WriteSet([DataEntry((v + "_status"), "team_chosen"), DataEntry((v + "_performer"), L), DataEntry((((v + "_applicant_") + L) + "_work_process"), "can_begin")]) | |
239 | 260 | } | |
240 | 261 | } | |
241 | 262 | ||
242 | 263 | ||
243 | 264 | ||
244 | - | @Callable( | |
245 | - | func startWork ( | |
246 | - | let | |
247 | - | if ((toString( | |
265 | + | @Callable(o) | |
266 | + | func startWork (v) = { | |
267 | + | let L = getStringValue(this, (v + "_performer")) | |
268 | + | if ((toString(o.caller) != getStringValue(this, (((v + "_applicant_") + L) + "_leader")))) | |
248 | 269 | then throw("team leader only") | |
249 | - | else WriteSet([DataEntry(( | |
270 | + | else WriteSet([DataEntry((v + "_status"), "work_started"), DataEntry((((v + "_applicant_") + L) + "_work_process"), "work_started")]) | |
250 | 271 | } | |
251 | 272 | ||
252 | 273 | ||
253 | 274 | ||
254 | - | @Callable( | |
255 | - | func acceptWorkResult ( | |
275 | + | @Callable(o) | |
276 | + | func acceptWorkResult (v) = if (!(l(o.caller))) | |
256 | 277 | then throw("grants working group access only") | |
257 | 278 | else { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | ScriptResult(WriteSet([DataEntry(( | |
279 | + | let ai = c((v + "_reward")) | |
280 | + | let L = getStringValue(this, (v + "_performer")) | |
281 | + | let aj = getStringValue(this, (((v + "_applicant_") + L) + "_leader")) | |
282 | + | ScriptResult(WriteSet([DataEntry((v + "_status"), "work_finished"), DataEntry((((v + "_applicant_") + L) + "_work_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(aj), ai, unit)])) | |
262 | 283 | } | |
263 | 284 | ||
264 | 285 |
github/deemru/w8io/026f985 90.22 ms ◑