tx · JCNi7nsSv242jsNQeVpQitHocbbTCiSN1ru2mB6GQ4yB 3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ: -0.10000000 Waves 2020.12.23 03:27 [1320619] smart account 3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ > SELF 0.00000000 Waves
{ "type": 13, "id": "JCNi7nsSv242jsNQeVpQitHocbbTCiSN1ru2mB6GQ4yB", "fee": 10000000, "feeAssetId": null, "timestamp": 1608683294522, "version": 2, "chainId": 84, "sender": "3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ", "senderPublicKey": "3Fjao2FW1JXSPd5EkP7C3uerW18HYacYsaMYALFMGA6N", "proofs": [ "4RWNXJ2hFUmdoftMHxq43nEUgkDN3K2Jb7X2YM2vcXoKi2sHfynDAAUCNBj7ifEbyPEp5i4c6PNEHPmDDdbnpFCm" ], "script": "base64:AAIDAAAAAAAAAC4IARIECgIICBIECgIIARIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIAAAAEgAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAAAAAAMbWFpbkNvbnRyYWN0CQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNNd1J6aTJCbXFaWlhXckNH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ZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAC3RlYW1BZGRyZXNzBQAAAAxyZXdhcmRBbW91bnQFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAACBncmFudHMgd29ya2luZyBncm91cCBhY2Nlc3Mgb25seQAAAACyv+L+", "height": 1320619, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6AVsrixoM7AgGC4MvTpaRANxjwf9Dyxr59rmRqx23on8 Next: ECxrfzzEiRg7q3WAddq3s9g13Z2zMc89zzBwssQnhU6D Full:
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 | 34 | let h = addressFromStringValue("3MwRzi2BmqZZXWrCGCwcRQLsnic2Aod6zhS") | |
35 | 35 | ||
36 | 36 | func i () = { | |
37 | 37 | let d = { | |
38 | 38 | let e = getString(h, "working_group_members") | |
39 | 39 | if ($isInstanceOf(e, "String")) | |
40 | 40 | then { | |
41 | 41 | let f = e | |
42 | 42 | f | |
43 | 43 | } | |
44 | 44 | else "" | |
45 | 45 | } | |
46 | 46 | d | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func j () = { | |
51 | 51 | let d = { | |
52 | 52 | let e = getString(h, "dao_members") | |
53 | 53 | if ($isInstanceOf(e, "String")) | |
54 | 54 | then { | |
55 | 55 | let f = e | |
56 | 56 | f | |
57 | 57 | } | |
58 | 58 | else "" | |
59 | 59 | } | |
60 | 60 | d | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func k () = { | |
65 | 65 | let d = { | |
66 | 66 | let e = getInteger(h, "dao_size") | |
67 | 67 | if ($isInstanceOf(e, "Int")) | |
68 | 68 | then { | |
69 | 69 | let f = e | |
70 | 70 | f | |
71 | 71 | } | |
72 | 72 | else 0 | |
73 | 73 | } | |
74 | 74 | d | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func l (m) = { | |
79 | 79 | let d = { | |
80 | 80 | let e = getInteger(h, (("working_group_member_" + toString(m)) + "_weight")) | |
81 | 81 | if ($isInstanceOf(e, "Int")) | |
82 | 82 | then { | |
83 | 83 | let f = e | |
84 | 84 | f | |
85 | 85 | } | |
86 | 86 | else 0 | |
87 | 87 | } | |
88 | 88 | (d > 0) | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func n (o) = { | |
93 | 93 | let d = { | |
94 | 94 | let e = getInteger(h, (("dao_member_" + toString(o.caller)) + "_weight")) | |
95 | 95 | if ($isInstanceOf(e, "Int")) | |
96 | 96 | then { | |
97 | 97 | let f = e | |
98 | 98 | f | |
99 | 99 | } | |
100 | 100 | else 0 | |
101 | 101 | } | |
102 | 102 | (d > 0) | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func p (q) = (g((("tasks_" + q) + "_status")) != "voting_started") | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func r (q) = (a > ((b((("tasks_" + q) + "_voting_amount")) * 100) / k())) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func s (t) = if ((t == "like")) | |
113 | 113 | then 1 | |
114 | 114 | else if ((t == "dislike")) | |
115 | 115 | then -1 | |
116 | 116 | else throw("you need to vote with 'like' or 'dislike' value") | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func u (q,v) = if (!(l(v))) | |
120 | 120 | then throw("grants working group access only") | |
121 | 121 | else true | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func w (q,v) = if ((g((("tasks_" + q) + "_status")) != "approved")) | |
125 | 125 | then throw("the task is not approved") | |
126 | 126 | else if ((toString(v) != g((("tasks_" + q) + "_leader")))) | |
127 | 127 | then throw("team leader only") | |
128 | 128 | else true | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func x (q,y,v) = if ((g((("tasks_" + q) + "_status")) != "")) | |
132 | 132 | then throw("voting was already started, so the reward amount cannot be changed") | |
133 | 133 | else if ((toString(v) != g((("tasks_" + q) + "_leader")))) | |
134 | 134 | then throw("team leader only") | |
135 | 135 | else true | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func z (q,o) = if (!(n(o))) | |
139 | 139 | then throw("you can't vote") | |
140 | 140 | else if (p(q)) | |
141 | 141 | then throw("voting is closed or not started") | |
142 | 142 | else if (!((b(((("tasks_" + q) + "_voted_") + toString(o.caller))) == 0))) | |
143 | 143 | then throw("you have already voted") | |
144 | 144 | else true | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func A (q,v) = if ((g((("tasks_" + q) + "_status")) != "voting_started")) | |
148 | 148 | then throw("voting is not active") | |
149 | 149 | else if (r(q)) | |
150 | 150 | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
151 | 151 | else if (!(l(v))) | |
152 | 152 | then throw("grants working group access only") | |
153 | 153 | else true | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func B (v) = if (!(l(v))) | |
157 | 157 | then throw("grants working group access only") | |
158 | 158 | else true | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | @Callable(o) | |
162 | 162 | func addTask (C,D) = WriteSet([DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_title"), C), DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_link"), D), DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_leader"), toString(o.caller))]) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | ||
166 | 166 | @Callable(o) | |
167 | 167 | func addReward (q,y) = if (x(q, y, o.caller)) | |
168 | 168 | then WriteSet([DataEntry((("tasks_" + q) + "_reward"), y)]) | |
169 | 169 | else throw("checks are not passed") | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(o) | |
174 | 174 | func initTaskVoting (q) = if (u(q, o.caller)) | |
175 | 175 | then WriteSet([DataEntry((("tasks_" + q) + "_status"), "voting_started")]) | |
176 | 176 | else throw("checks are not passed") | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | ||
180 | 180 | @Callable(o) | |
181 | 181 | func voteForTaskProposal (q,E) = if (z(q, o)) | |
182 | 182 | then { | |
183 | 183 | let F = ((("tasks_" + q) + "_voted_") + toString(o.caller)) | |
184 | 184 | let G = (("tasks_" + q) + "_voting_state") | |
185 | 185 | let H = (("tasks_" + q) + "_voting_amount") | |
186 | 186 | let I = s(E) | |
187 | 187 | let J = b(G) | |
188 | 188 | let K = (b(H) + 1) | |
189 | 189 | WriteSet([DataEntry(G, (J + I)), DataEntry(F, I), DataEntry(H, K)]) | |
190 | 190 | } | |
191 | 191 | else throw("checks are not passed") | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(o) | |
196 | 196 | func finishTaskProposalVoting (q) = if (A(q, o.caller)) | |
197 | 197 | then { | |
198 | 198 | let L = (("tasks_" + q) + "_status") | |
199 | 199 | let G = (("tasks_" + q) + "_voting_state") | |
200 | 200 | WriteSet([DataEntry(L, if ((b(G) > 0)) | |
201 | 201 | then "approved" | |
202 | 202 | else "rejected")]) | |
203 | 203 | } | |
204 | 204 | else throw("checks are not passed") | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | ||
208 | 208 | @Callable(o) | |
209 | 209 | func startWork (q) = if (w(q, o.caller)) | |
210 | 210 | then WriteSet([DataEntry((("tasks_" + q) + "_status"), "work_started")]) | |
211 | 211 | else throw("checks are not passed") | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | ||
215 | 215 | @Callable(o) | |
216 | 216 | func rejectTask (q) = if (l(o.caller)) | |
217 | 217 | then WriteSet([DataEntry((("tasks_" + q) + "_status"), "rejected")]) | |
218 | 218 | else throw("grants working group access only") | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(o) | |
223 | 223 | func acceptWorkResult (q,M) = if (B(o.caller)) | |
224 | 224 | then { | |
225 | 225 | let N = b((("tasks_" + q) + "_reward")) | |
226 | 226 | let O = getStringValue(this, (("tasks_" + q) + "_leader")) | |
227 | 227 | ScriptResult(WriteSet([DataEntry((("tasks_" + q) + "_status"), "work_finished"), DataEntry((("tasks_" + q) + "_report"), M)]), TransferSet([ScriptTransfer(addressFromStringValue(O), N, unit)])) | |
228 | 228 | } | |
229 | 229 | else throw("grants working group access only") | |
230 | 230 | ||
231 | 231 |
github/deemru/w8io/169f3d6 41.00 ms ◑