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