tx · CwvKZj36NgmwuCnUmn6dvsxzNVvbrSJfkk4AffWtqCKm

3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5:  -0.10000000 Waves

2020.11.20 01:39 [1272851] smart account 3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5 > SELF 0.00000000 Waves

{ "type": 13, "id": "CwvKZj36NgmwuCnUmn6dvsxzNVvbrSJfkk4AffWtqCKm", "fee": 10000000, "feeAssetId": null, "timestamp": 1605825607740, "version": 2, "chainId": 84, "sender": "3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5", "senderPublicKey": "BWQB37E3JLeot6EcSVXsbJMugLUYNarK8xU8W5XAPsvJ", "proofs": [ "48XoQ81rvBz1gtPkXpiXu8pkncXqj34H3pkupji2ritvrqBFLG5vGTeezSLjR8a7jSEyhwWKk1h2Bwbq7ViRApZb" ], "script": "base64:AAIDAAAAAAAAAD8IARIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIEgUKAwgICBIFCgMICAgSAwoBCBIDCgEIEgMKAQgAAAAIAAAAAAZRVU9SVU0AAAAAAAAAAAEBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAAdpc093bmVyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAACGdldEdyb3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ADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAAA++CbxQ==", "height": 1272851, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CJtrqoTHsJ6sSbJ32iAGj8TaFnxYq9k94xnXZ4p7qTAo Next: B5MmUsuaDXF5btZ9fGNX5Eu1DjmBxavqokS2w1AMMVgY Diff:
OldNewDifferences
205205 let Q = (drop(toString(o.caller), 10) + drop(P, 10))
206206 let B = ((((("tasks_" + w) + "_app_") + P) + "_voted_") + Q)
207207 let A = g(B)
208- if ((A != toString(o.caller)))
209- then throw("you have already voted on this team")
210- else {
211- let R = (((("tasks_" + w) + "_app_") + P) + "_votes")
212- let S = (((("tasks_" + w) + "_app_") + P) + "_score")
213- let T = (1 + b(R))
214- let U = (z(y) + b(S))
215- WriteSet([DataEntry(B, toString(o.caller)), DataEntry(R, T), DataEntry(S, U)])
216- }
208+ let R = (((("tasks_" + w) + "_app_") + P) + "_votes")
209+ let S = (((("tasks_" + w) + "_app_") + P) + "_score")
210+ let T = (1 + b(R))
211+ let U = (z(y) + b(S))
212+ WriteSet([DataEntry(B, toString(o.caller)), DataEntry(R, T), DataEntry(S, U)])
217213 }
218214
219215
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 1
55
66 func b (c) = {
77 let d = {
88 let e = getInteger(this, c)
99 if ($isInstanceOf(e, "Int"))
1010 then {
1111 let f = e
1212 f
1313 }
1414 else 0
1515 }
1616 d
1717 }
1818
1919
2020 func g (c) = {
2121 let d = {
2222 let e = getString(this, c)
2323 if ($isInstanceOf(e, "String"))
2424 then {
2525 let f = e
2626 f
2727 }
2828 else ""
2929 }
3030 d
3131 }
3232
3333
3434 func h (i) = (i == this)
3535
3636
3737 func j () = {
3838 let d = {
3939 let e = getString(this, "working_group")
4040 if ($isInstanceOf(e, "String"))
4141 then {
4242 let f = e
4343 f
4444 }
4545 else ""
4646 }
4747 d
4848 }
4949
5050
5151 func k () = {
5252 let d = {
5353 let e = getString(this, "dao_members")
5454 if ($isInstanceOf(e, "String"))
5555 then {
5656 let f = e
5757 f
5858 }
5959 else ""
6060 }
6161 d
6262 }
6363
6464
6565 func l (m) = (b((("working_group_member_" + toString(m)) + "_weight")) > 0)
6666
6767
6868 func n (o) = (b((("dao_member_" + toString(o.caller)) + "_weight")) > 0)
6969
7070
7171 @Callable(o)
7272 func addDAOMember (p) = if (!(h(o.caller)))
7373 then throw("access only to the DAO owner")
7474 else if ((b((("dao_member_" + p) + "_weight")) == 1))
7575 then throw("this user already exists")
7676 else {
7777 let q = k()
7878 let r = ((q + ";") + p)
7979 let s = b("dao_size")
8080 let t = (s + 1)
8181 WriteSet([DataEntry("dao_members", r), DataEntry("dao_size", t), DataEntry((("dao_member_" + p) + "_weight"), 1)])
8282 }
8383
8484
8585
8686 @Callable(o)
8787 func addGroupMember (p) = if (!(h(o.caller)))
8888 then throw("access only to the DAO owner")
8989 else if ((b((("working_group_member_" + p) + "_weight")) == 1))
9090 then throw("This user already exists")
9191 else {
9292 let q = j()
9393 let r = ((q + ";") + p)
9494 let s = b("working_group_size")
9595 let t = (s + 1)
9696 WriteSet([DataEntry("working_group_name", r), DataEntry("working_group_size", t), DataEntry((("working_group_member_" + p) + "_weight"), 1)])
9797 }
9898
9999
100100
101101 @Callable(o)
102102 func addTask (u,v) = if (!(l(o.caller)))
103103 then throw("grants working group access only")
104104 else WriteSet([DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_title"), u), DataEntry((("tasks_" + toBase58String(o.transactionId)) + "_link"), v)])
105105
106106
107107
108108 @Callable(o)
109109 func addTaskDetails (w) = if (!(l(o.caller)))
110110 then throw("grants working group access only")
111111 else {
112112 let x = extract(o.payment).amount
113113 WriteSet([DataEntry((("tasks_" + w) + "_reward"), x), DataEntry((("tasks_" + w) + "_status"), "proposed")])
114114 }
115115
116116
117117
118118 @Callable(o)
119119 func voteForTaskProposal (w,y) = if (!(n(o)))
120120 then throw("you can't vote")
121121 else if ((getStringValue(this, (("tasks_" + w) + "_status")) != "proposed"))
122122 then throw("voting is closed or not started")
123123 else if (if ((y != "like"))
124124 then (y != "dislike")
125125 else false)
126126 then throw("you need to vote like or dislike")
127127 else {
128128 func z (A) = if ((A == "like"))
129129 then 1
130130 else -1
131131
132132 let B = ((("tasks_" + w) + "_voted_") + toString(o.caller))
133133 let C = b(B)
134134 if (!((C == 0)))
135135 then throw("you have already voted")
136136 else {
137137 let D = (("tasks_" + w) + "_voting_state")
138138 let E = b(D)
139139 let F = (("tasks_" + w) + "_voting_amount")
140140 let G = (b(D) + 1)
141141 let H = (E + z(y))
142142 ScriptResult(WriteSet([DataEntry(D, H), DataEntry(B, z(y)), DataEntry(F, G)]), TransferSet([ScriptTransfer(o.caller, 500000, unit)]))
143143 }
144144 }
145145
146146
147147
148148 @Callable(o)
149149 func finishTaskProposalVoting (w) = if ((a > ((b((("tasks_" + w) + "_voting_amount")) * 100) / b("dao_size"))))
150150 then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting"))
151151 else if (!(l(o.caller)))
152152 then throw("grants working group access only")
153153 else {
154154 let D = (("tasks_" + w) + "_voting_state")
155155 let E = b(D)
156156 if ((E > 0))
157157 then {
158158 let I = "ready_to_apply"
159159 WriteSet([DataEntry((("tasks_" + w) + "_status"), I)])
160160 }
161161 else {
162162 let I = "rejected"
163163 WriteSet([DataEntry((("tasks_" + w) + "_status"), I)])
164164 }
165165 }
166166
167167
168168
169169 @Callable(o)
170170 func applyForTask (w,J,v) = {
171171 let K = g((("tasks_" + w) + "_status"))
172172 if ((K != "ready_to_apply"))
173173 then throw("this grant has not yet been approved")
174174 else {
175175 let L = drop(toString(o.caller), 10)
176176 if ((g((((("tasks_" + w) + "_app_") + L) + "_name")) == J))
177177 then throw("commnad with name is exist")
178178 else {
179179 let M = (("tasks_" + w) + "_applicants")
180180 let N = g(M)
181181 let O = ((N + ";") + toString(o.caller))
182182 WriteSet([DataEntry((((("tasks_" + w) + "_app_") + L) + "_name"), J), DataEntry((((("tasks_" + w) + "_app_") + L) + "_link"), v), DataEntry((((("tasks_" + w) + "_app_") + L) + "_leader"), toString(o.caller)), DataEntry((((("tasks_" + w) + "_app_") + L) + "_id"), L), DataEntry(M, O)])
183183 }
184184 }
185185 }
186186
187187
188188
189189 @Callable(o)
190190 func voteForApplicant (w,P,y) = if (!(n(o)))
191191 then throw("you can't vote")
192192 else if ((g((("tasks_" + w) + "_status")) != "ready_to_apply"))
193193 then throw("voting is closed or not started")
194194 else if ((g((((("tasks_" + w) + "_app_") + P) + "_id")) != P))
195195 then throw("team is not found use id team on application")
196196 else if (if ((y != "like"))
197197 then (y != "dislike")
198198 else false)
199199 then throw("you need to vote like or dislike")
200200 else {
201201 func z (A) = if ((A == "like"))
202202 then 1
203203 else -1
204204
205205 let Q = (drop(toString(o.caller), 10) + drop(P, 10))
206206 let B = ((((("tasks_" + w) + "_app_") + P) + "_voted_") + Q)
207207 let A = g(B)
208- if ((A != toString(o.caller)))
209- then throw("you have already voted on this team")
210- else {
211- let R = (((("tasks_" + w) + "_app_") + P) + "_votes")
212- let S = (((("tasks_" + w) + "_app_") + P) + "_score")
213- let T = (1 + b(R))
214- let U = (z(y) + b(S))
215- WriteSet([DataEntry(B, toString(o.caller)), DataEntry(R, T), DataEntry(S, U)])
216- }
208+ let R = (((("tasks_" + w) + "_app_") + P) + "_votes")
209+ let S = (((("tasks_" + w) + "_app_") + P) + "_score")
210+ let T = (1 + b(R))
211+ let U = (z(y) + b(S))
212+ WriteSet([DataEntry(B, toString(o.caller)), DataEntry(R, T), DataEntry(S, U)])
217213 }
218214
219215
220216
221217 @Callable(o)
222218 func finishApplicantsVoting (w) = {
223219 func V (W,X) = {
224220 let M = (("tasks_" + w) + "_applicants")
225221 let Y = split(getStringValue(this, M), ";")
226222 let P = Y[W]
227223 let R = (((("tasks_" + w) + "_app_") + P) + "_votes")
228224 let T = b(R)
229225 if ((T > 0))
230226 then 1
231227 else throw(("not enough votes to make decision on " + P))
232228 }
233229
234230 func Z (W,X) = {
235231 let M = (("tasks_" + w) + "_applicants")
236232 let Y = split(getStringValue(this, M), ";")
237233 let P = Y[W]
238234 let R = (((("tasks_" + w) + "_app_") + P) + "_votes")
239235 let T = b(R)
240236 let aa = Y[X]
241237 let ab = (((("tasks_" + w) + "_app_") + aa) + "_votes")
242238 let ac = b(ab)
243239 if ((T > ac))
244240 then W
245241 else X
246242 }
247243
248244 if (!(l(o.caller)))
249245 then throw("grants working group access only")
250246 else {
251247 let ad = g((("tasks_" + w) + "_applicants"))
252248 let Y = split(ad, ";")
253249 if ((size(Y) == 0))
254250 then throw("No one has yet responded to the grant")
255251 else {
256252 let ae = {
257253 let af = [0, 1]
258254 let ag = size(af)
259255 let ah = 0
260256 if ((ag == 0))
261257 then ah
262258 else {
263259 let ai = Z(ah, af[0])
264260 if ((ag == 1))
265261 then ai
266262 else {
267263 let aj = Z(ai, af[1])
268264 if ((ag == 2))
269265 then aj
270266 else {
271267 let ak = Z(aj, af[2])
272268 throw("List size exceed 2")
273269 }
274270 }
275271 }
276272 }
277273 let P = Y[ae]
278274 WriteSet([DataEntry((("tasks_" + w) + "_status"), "team_chosen"), DataEntry((("tasks_" + w) + "_performer"), P), DataEntry((((("tasks_" + w) + "_app_") + P) + "_process"), "can_begin")])
279275 }
280276 }
281277 }
282278
283279
284280
285281 @Callable(o)
286282 func startWork (w) = {
287283 let P = g((("tasks_" + w) + "_performer"))
288284 if ((g((("tasks_" + w) + "_status")) != "team_chosen"))
289285 then throw("team is not choosen")
290286 else if ((toString(o.caller) != g((((("tasks_" + w) + "_app_") + P) + "_leader"))))
291287 then throw("team leader only")
292288 else WriteSet([DataEntry((("tasks_" + w) + "_status"), "work_started"), DataEntry((((("tasks_" + w) + "_app_") + P) + "_process"), "work_started")])
293289 }
294290
295291
296292
297293 @Callable(o)
298294 func acceptWorkResult (w) = if (!(l(o.caller)))
299295 then throw("grants working group access only")
300296 else {
301297 let al = b((("tasks_" + w) + "_reward"))
302298 let P = getStringValue(this, (("tasks_" + w) + "_performer"))
303299 let am = getStringValue(this, (((("tasks_" + w) + "_app_") + P) + "_leader"))
304300 ScriptResult(WriteSet([DataEntry((("tasks_" + w) + "_status"), "work_finished"), DataEntry((((("tasks_" + w) + "_app_") + P) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(am), al, unit)]))
305301 }
306302
307303

github/deemru/w8io/026f985 
43.75 ms