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