tx · BLsdquzap5uJNZugnUPLA5W7XutX8hCvKxCDBdQe85GR 3N8vs4Uz22LCQNvdRrogKS6F4zQ7ojq6oVD: -0.01000000 Waves 2021.03.22 18:49 [1449153] smart account 3N8vs4Uz22LCQNvdRrogKS6F4zQ7ojq6oVD > SELF 0.00000000 Waves
{ "type": 13, "id": "BLsdquzap5uJNZugnUPLA5W7XutX8hCvKxCDBdQe85GR", "fee": 1000000, "feeAssetId": null, "timestamp": 1616428164816, "version": 1, "sender": "3N8vs4Uz22LCQNvdRrogKS6F4zQ7ojq6oVD", "senderPublicKey": "DJkBRJT1su4LQFE1t2YP47QaeU7UGAJWs2wAaFXAJLjM", "proofs": [ "5ZS2AA3nKu8J3WNm8UsXD5HruAPgAKQRzjJbXfA3df4zprNvFph4uURyKMuJBY3QWGmquABKwQaryM1Sj8xkwHY4" ], "script": "base64:AAIDAAAAAAAAADQIARIFCgMICAgSAwoBCBIECgIIARIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIAAAAEgAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAAAAAAMbWFpbkNvbnRyYWN0CQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOOVpja0VhTFFycTZTY0ZLNDJl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EUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfbGVhZGVyCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfc3RhdHVzAgAAAA13b3JrX2ZpbmlzaGVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19yZXBvcnQFAAAACnJlcG9ydExpbmsFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAC3RlYW1BZGRyZXNzBQAAAAxyZXdhcmRBbW91bnQFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAACBncmFudHMgd29ya2luZyBncm91cCBhY2Nlc3Mgb25seQAAAAA70KD2", "chainId": 84, "height": 1449153, "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 = 1 | |
5 | + | ||
6 | + | func b (c) = { | |
7 | + | let d = { | |
8 | + | let e = getInteger(this, c) | |
9 | + | if ($isInstanceOf(e, "Int")) | |
10 | + | then { | |
11 | + | let f = e | |
12 | + | f | |
13 | + | } | |
14 | + | else 0 | |
15 | + | } | |
16 | + | d | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | func g (c) = { | |
21 | + | let d = { | |
22 | + | let e = getString(this, c) | |
23 | + | if ($isInstanceOf(e, "String")) | |
24 | + | then { | |
25 | + | let f = e | |
26 | + | f | |
27 | + | } | |
28 | + | else "" | |
29 | + | } | |
30 | + | d | |
31 | + | } | |
32 | + | ||
33 | + | ||
34 | + | let h = addressFromStringValue("3N9ZckEaLQrq6ScFK42e5tF7Vso3tRvAVBP") | |
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 | + | } | |
48 | + | ||
49 | + | ||
50 | + | func j () = { | |
51 | + | let d = { | |
52 | + | let e = getString(h, "dao_members") | |
53 | + | if ($isInstanceOf(e, "String")) | |
54 | + | then { | |
55 | + | let f = e | |
56 | + | f | |
57 | + | } | |
58 | + | else "" | |
59 | + | } | |
60 | + | d | |
61 | + | } | |
62 | + | ||
63 | + | ||
64 | + | func k () = { | |
65 | + | let d = { | |
66 | + | let e = getInteger(h, "dao_size") | |
67 | + | if ($isInstanceOf(e, "Int")) | |
68 | + | then { | |
69 | + | let f = e | |
70 | + | f | |
71 | + | } | |
72 | + | else 0 | |
73 | + | } | |
74 | + | d | |
75 | + | } | |
76 | + | ||
77 | + | ||
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 | + | } | |
90 | + | ||
91 | + | ||
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 | + | } | |
104 | + | ||
105 | + | ||
106 | + | func p (q) = (g((("tasks_" + q) + "_status")) != "voting_started") | |
107 | + | ||
108 | + | ||
109 | + | func r (q) = (a > ((b((("tasks_" + q) + "_voting_amount")) * 100) / k())) | |
110 | + | ||
111 | + | ||
112 | + | func s (t) = if ((t == "like")) | |
113 | + | then 1 | |
114 | + | else if ((t == "dislike")) | |
115 | + | then -1 | |
116 | + | else throw("you need to vote with 'like' or 'dislike' value") | |
117 | + | ||
118 | + | ||
119 | + | func u (q,v) = if (!(l(v))) | |
120 | + | then throw("grants working group access only") | |
121 | + | else if ((g((("tasks_" + q) + "_status")) != "")) | |
122 | + | then throw("task is not new") | |
123 | + | else true | |
124 | + | ||
125 | + | ||
126 | + | func w (q,v) = if ((g((("tasks_" + q) + "_status")) != "approved")) | |
127 | + | then throw("the task is not approved") | |
128 | + | else if ((toString(v) != g((("tasks_" + q) + "_leader")))) | |
129 | + | then throw("team leader only") | |
130 | + | else true | |
131 | + | ||
132 | + | ||
133 | + | func x (q,y,v) = if ((g((("tasks_" + q) + "_status")) != "")) | |
134 | + | then throw("voting was already started, so the reward amount cannot be changed") | |
135 | + | else if ((toString(v) != g((("tasks_" + q) + "_leader")))) | |
136 | + | then throw("team leader only") | |
137 | + | else true | |
138 | + | ||
139 | + | ||
140 | + | func z (q,o) = if (!(n(o))) | |
141 | + | then throw("you can't vote") | |
142 | + | else if (p(q)) | |
143 | + | then throw("voting is closed or not started") | |
144 | + | else if (!((b(((("tasks_" + q) + "_voted_") + toString(o.caller))) == 0))) | |
145 | + | then throw("you have already voted") | |
146 | + | else true | |
147 | + | ||
148 | + | ||
149 | + | func A (q,v) = if ((g((("tasks_" + q) + "_status")) != "voting_started")) | |
150 | + | then throw("voting is not active") | |
151 | + | else if (r(q)) | |
152 | + | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
153 | + | else if (!(l(v))) | |
154 | + | then throw("grants working group access only") | |
155 | + | else true | |
156 | + | ||
157 | + | ||
158 | + | func B (v) = if (!(l(v))) | |
159 | + | then throw("grants working group access only") | |
160 | + | else true | |
161 | + | ||
162 | + | ||
163 | + | @Callable(o) | |
164 | + | func addTask (C,D,E) = WriteSet([DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_title"), C), DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_link"), D), DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_hash"), E), DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_leader"), toString(o.caller))]) | |
165 | + | ||
166 | + | ||
167 | + | ||
168 | + | @Callable(o) | |
169 | + | func resetHash (E) = WriteSet([DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_hash"), E)]) | |
170 | + | ||
171 | + | ||
172 | + | ||
173 | + | @Callable(o) | |
174 | + | func addReward (q,y) = if (x(q, y, o.caller)) | |
175 | + | then WriteSet([DataEntry((("tasks_" + q) + "_reward"), y)]) | |
176 | + | else throw("checks are not passed") | |
177 | + | ||
178 | + | ||
179 | + | ||
180 | + | @Callable(o) | |
181 | + | func initTaskVoting (q) = if (u(q, o.caller)) | |
182 | + | then WriteSet([DataEntry((("tasks_" + q) + "_status"), "voting_started")]) | |
183 | + | else throw("checks are not passed") | |
184 | + | ||
185 | + | ||
186 | + | ||
187 | + | @Callable(o) | |
188 | + | func voteForTaskProposal (q,F) = if (z(q, o)) | |
189 | + | then { | |
190 | + | let G = ((("tasks_" + q) + "_voted_") + toString(o.caller)) | |
191 | + | let H = (("tasks_" + q) + "_voting_state") | |
192 | + | let I = (("tasks_" + q) + "_voting_amount") | |
193 | + | let J = s(F) | |
194 | + | let K = b(H) | |
195 | + | let L = (b(I) + 1) | |
196 | + | WriteSet([DataEntry(H, (K + J)), DataEntry(G, J), DataEntry(I, L)]) | |
197 | + | } | |
198 | + | else throw("checks are not passed") | |
199 | + | ||
200 | + | ||
201 | + | ||
202 | + | @Callable(o) | |
203 | + | func finishTaskProposalVoting (q) = if (A(q, o.caller)) | |
204 | + | then { | |
205 | + | let M = (("tasks_" + q) + "_status") | |
206 | + | let H = (("tasks_" + q) + "_voting_state") | |
207 | + | WriteSet([DataEntry(M, if ((b(H) > 0)) | |
208 | + | then "approved" | |
209 | + | else "rejected")]) | |
210 | + | } | |
211 | + | else throw("checks are not passed") | |
212 | + | ||
213 | + | ||
214 | + | ||
215 | + | @Callable(o) | |
216 | + | func startWork (q) = if (w(q, o.caller)) | |
217 | + | then WriteSet([DataEntry((("tasks_" + q) + "_status"), "work_started")]) | |
218 | + | else throw("checks are not passed") | |
219 | + | ||
220 | + | ||
221 | + | ||
222 | + | @Callable(o) | |
223 | + | func rejectTask (q) = if (l(o.caller)) | |
224 | + | then WriteSet([DataEntry((("tasks_" + q) + "_status"), "rejected")]) | |
225 | + | else throw("grants working group access only") | |
226 | + | ||
227 | + | ||
228 | + | ||
229 | + | @Callable(o) | |
230 | + | func acceptWorkResult (q,N) = if (B(o.caller)) | |
231 | + | then { | |
232 | + | let O = b((("tasks_" + q) + "_reward")) | |
233 | + | let P = getStringValue(this, (("tasks_" + q) + "_leader")) | |
234 | + | ScriptResult(WriteSet([DataEntry((("tasks_" + q) + "_status"), "work_finished"), DataEntry((("tasks_" + q) + "_report"), N)]), TransferSet([ScriptTransfer(addressFromStringValue(P), O, unit)])) | |
235 | + | } | |
236 | + | else throw("grants working group access only") | |
237 | + | ||
238 | + |
github/deemru/w8io/026f985 23.33 ms ◑