tx · 13WH727DhVupVkFsQ1KkuobUAquX3GysomUnqUPUfCFo 3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5: -0.10000000 Waves 2020.11.19 23:30 [1272714] smart account 3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5 > SELF 0.00000000 Waves
{ "type": 13, "id": "13WH727DhVupVkFsQ1KkuobUAquX3GysomUnqUPUfCFo", "fee": 10000000, "feeAssetId": null, "timestamp": 1605817839743, "version": 2, "chainId": 84, "sender": "3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5", "senderPublicKey": "BWQB37E3JLeot6EcSVXsbJMugLUYNarK8xU8W5XAPsvJ", "proofs": [ "2dYKhZdhPUvVMZNgQpuAqxuqTEUiVNLLnD9uXQp9ap34oygKcxExxtvgnNLdWodL29634yckkW6e17AJhuHMkp58" ], "script": "base64:AAIDAAAAAAAAAD8IARIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIIARIDCgEIEgUKAwgICBIFCgMICAESAwoBCBIDCgEIEgMKAQgAAAAIAAAAAAZRVU9SVU0AAAAAAAAAAAEBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAAdpc093bmVyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAACGdldEdyb3VwAAAAAAQAAAADd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mUoMTA1MykAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAACl9wZXJmb3JtZXIEAAAAC3RlYW1BZGRyZXNzCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAVfYXBwXwUAAAAOdGVhbUlkZW50aWZpZXICAAAAB19sZWFkZXIJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19zdGF0dXMCAAAADXdvcmtfZmluaXNoZWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAABV9hcHBfBQAAAA50ZWFtSWRlbnRpZmllcgIAAAAIX3Byb2Nlc3MCAAAADXdvcmtfZmluaXNoZWQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAC3RlYW1BZGRyZXNzBQAAAAxyZXdhcmRBbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAAAITOCq", "height": 1272714, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3ECER4EGqDnSmfGXrHiC1653UAYEHTj9yhxU8vYGB9bN Next: 8dse6KgnUJJEHBeohhSLXcXcTtGJQaZHRjvBpmnd4Ero Diff:
Old | New | Differences | |
---|---|---|---|
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 | - | then throw(" | |
75 | + | then throw("this user already exists") | |
76 | 76 | else { | |
77 | 77 | let q = k() | |
78 | 78 | let r = ((q + ";") + p) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | @Callable(o) | |
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 | - | if (!((A == 0))) | |
131 | - | then throw("you have already voted") | |
132 | - | else { | |
133 | - | let B = (("tasks_" + w) + "_voting_state") | |
134 | - | let C = b(B) | |
135 | - | let D = (("tasks_" + w) + "_voting_amount") | |
136 | - | let E = (b(B) + 1) | |
137 | - | let F = (C + y) | |
138 | - | ScriptResult(WriteSet([DataEntry(B, F), DataEntry(z, y), DataEntry(D, E)]), TransferSet([ScriptTransfer(o.caller, 500000, unit)])) | |
139 | - | } | |
140 | - | } | |
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 | + | } | |
141 | 139 | ||
142 | 140 | ||
143 | 141 | ||
166 | 164 | func applyForTask (w,H,v) = { | |
167 | 165 | let I = g((("tasks_" + w) + "_status")) | |
168 | 166 | if ((I != "ready_to_apply")) | |
169 | - | then throw(" | |
167 | + | then throw("this grant has not yet been approved") | |
170 | 168 | else { | |
171 | 169 | let J = (("tasks_" + w) + "_applicants") | |
172 | 170 | let K = g(J) |
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 | - | then throw(" | |
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 (!(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 | - | if (!((A == 0))) | |
131 | - | then throw("you have already voted") | |
132 | - | else { | |
133 | - | let B = (("tasks_" + w) + "_voting_state") | |
134 | - | let C = b(B) | |
135 | - | let D = (("tasks_" + w) + "_voting_amount") | |
136 | - | let E = (b(B) + 1) | |
137 | - | let F = (C + y) | |
138 | - | ScriptResult(WriteSet([DataEntry(B, F), DataEntry(z, y), DataEntry(D, E)]), TransferSet([ScriptTransfer(o.caller, 500000, unit)])) | |
139 | - | } | |
140 | - | } | |
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 | + | } | |
141 | 139 | ||
142 | 140 | ||
143 | 141 | ||
144 | 142 | @Callable(o) | |
145 | 143 | func finishTaskProposalVoting (w) = if ((a > ((b((("tasks_" + w) + "_voting_amount")) * 100) / b("dao_size")))) | |
146 | 144 | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
147 | 145 | else if (!(l(o.caller))) | |
148 | 146 | then throw("grants working group access only") | |
149 | 147 | else { | |
150 | 148 | let B = (("tasks_" + w) + "_voting_state") | |
151 | 149 | let C = b(B) | |
152 | 150 | if ((C > 0)) | |
153 | 151 | then { | |
154 | 152 | let G = "ready_to_apply" | |
155 | 153 | WriteSet([DataEntry((("tasks_" + w) + "_status"), G)]) | |
156 | 154 | } | |
157 | 155 | else { | |
158 | 156 | let G = "rejected" | |
159 | 157 | WriteSet([DataEntry((("tasks_" + w) + "_status"), G)]) | |
160 | 158 | } | |
161 | 159 | } | |
162 | 160 | ||
163 | 161 | ||
164 | 162 | ||
165 | 163 | @Callable(o) | |
166 | 164 | func applyForTask (w,H,v) = { | |
167 | 165 | let I = g((("tasks_" + w) + "_status")) | |
168 | 166 | if ((I != "ready_to_apply")) | |
169 | - | then throw(" | |
167 | + | then throw("this grant has not yet been approved") | |
170 | 168 | else { | |
171 | 169 | let J = (("tasks_" + w) + "_applicants") | |
172 | 170 | let K = g(J) | |
173 | 171 | let L = drop(toString(o.caller), 10) | |
174 | 172 | let M = ((K + ";") + toString(o.caller)) | |
175 | 173 | 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)]) | |
176 | 174 | } | |
177 | 175 | } | |
178 | 176 | ||
179 | 177 | ||
180 | 178 | ||
181 | 179 | @Callable(o) | |
182 | 180 | func voteForApplicant (w,N,y) = if (!(n(o))) | |
183 | 181 | then throw("you can't vote") | |
184 | 182 | else { | |
185 | 183 | let O = (drop(toString(o.caller), 10) + drop(N, 10)) | |
186 | 184 | let z = ((("tasks_" + w) + "_vote_") + O) | |
187 | 185 | let P = b(z) | |
188 | 186 | if ((P != 0)) | |
189 | 187 | then throw("you have already voted on this team") | |
190 | 188 | else { | |
191 | 189 | let Q = (((("tasks_" + w) + "_app_") + N) + "_votes") | |
192 | 190 | let R = (((("tasks_" + w) + "_app_") + N) + "_score") | |
193 | 191 | let S = (1 + b(Q)) | |
194 | 192 | let T = (y + b(R)) | |
195 | 193 | WriteSet([DataEntry(z, y), DataEntry(R, T)]) | |
196 | 194 | } | |
197 | 195 | } | |
198 | 196 | ||
199 | 197 | ||
200 | 198 | ||
201 | 199 | @Callable(o) | |
202 | 200 | func finishApplicantsVoting (w) = { | |
203 | 201 | func U (V,W) = { | |
204 | 202 | let J = (("tasks_" + w) + "_applicants") | |
205 | 203 | let X = split(getStringValue(this, J), ";") | |
206 | 204 | let N = X[V] | |
207 | 205 | let Q = (((("tasks_" + w) + "_app_") + N) + "_votes") | |
208 | 206 | let S = b(Q) | |
209 | 207 | if ((S > 0)) | |
210 | 208 | then 1 | |
211 | 209 | else throw(("not enough votes to make decision on " + N)) | |
212 | 210 | } | |
213 | 211 | ||
214 | 212 | func Y (V,W) = { | |
215 | 213 | let J = (("tasks_" + w) + "_applicants") | |
216 | 214 | let X = split(getStringValue(this, J), ";") | |
217 | 215 | let N = X[V] | |
218 | 216 | let Q = (((("tasks_" + w) + "_app_") + N) + "_votes") | |
219 | 217 | let S = b(Q) | |
220 | 218 | let Z = X[W] | |
221 | 219 | let aa = (((("tasks_" + w) + "_app_") + Z) + "_votes") | |
222 | 220 | let ab = b(aa) | |
223 | 221 | if ((S > ab)) | |
224 | 222 | then V | |
225 | 223 | else W | |
226 | 224 | } | |
227 | 225 | ||
228 | 226 | if (!(l(o.caller))) | |
229 | 227 | then throw("grants working group access only") | |
230 | 228 | else { | |
231 | 229 | let ac = g((("tasks_" + w) + "_applicants")) | |
232 | 230 | let X = split(ac, ";") | |
233 | 231 | if ((size(X) == 0)) | |
234 | 232 | then throw("No one has yet responded to the grant") | |
235 | 233 | else { | |
236 | 234 | let ad = { | |
237 | 235 | let ae = [0, 1] | |
238 | 236 | let af = size(ae) | |
239 | 237 | let ag = 0 | |
240 | 238 | if ((af == 0)) | |
241 | 239 | then ag | |
242 | 240 | else { | |
243 | 241 | let ah = Y(ag, ae[0]) | |
244 | 242 | if ((af == 1)) | |
245 | 243 | then ah | |
246 | 244 | else { | |
247 | 245 | let ai = Y(ah, ae[1]) | |
248 | 246 | if ((af == 2)) | |
249 | 247 | then ai | |
250 | 248 | else { | |
251 | 249 | let aj = Y(ai, ae[2]) | |
252 | 250 | throw("List size exceed 2") | |
253 | 251 | } | |
254 | 252 | } | |
255 | 253 | } | |
256 | 254 | } | |
257 | 255 | let N = X[ad] | |
258 | 256 | WriteSet([DataEntry((("tasks_" + w) + "_status"), "team_chosen"), DataEntry((("tasks_" + w) + "_performer"), N), DataEntry((((("tasks_" + w) + "_app_") + N) + "_process"), "can_begin")]) | |
259 | 257 | } | |
260 | 258 | } | |
261 | 259 | } | |
262 | 260 | ||
263 | 261 | ||
264 | 262 | ||
265 | 263 | @Callable(o) | |
266 | 264 | func startWork (w) = { | |
267 | 265 | let N = getStringValue(this, (("tasks_" + w) + "_performer")) | |
268 | 266 | if ((toString(o.caller) != getStringValue(this, (((("tasks_" + w) + "_app_") + N) + "_leader")))) | |
269 | 267 | then throw("team leader only") | |
270 | 268 | else WriteSet([DataEntry((("tasks_" + w) + "_status"), "work_started"), DataEntry((((("tasks_" + w) + "_app_") + N) + "_process"), "work_started")]) | |
271 | 269 | } | |
272 | 270 | ||
273 | 271 | ||
274 | 272 | ||
275 | 273 | @Callable(o) | |
276 | 274 | func acceptWorkResult (w) = if (!(l(o.caller))) | |
277 | 275 | then throw("grants working group access only") | |
278 | 276 | else { | |
279 | 277 | let ak = b((("tasks_" + w) + "_reward")) | |
280 | 278 | let N = getStringValue(this, (("tasks_" + w) + "_performer")) | |
281 | 279 | let al = getStringValue(this, (((("tasks_" + w) + "_app_") + N) + "_leader")) | |
282 | 280 | ScriptResult(WriteSet([DataEntry((("tasks_" + w) + "_status"), "work_finished"), DataEntry((((("tasks_" + w) + "_app_") + N) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(al), ak, unit)])) | |
283 | 281 | } | |
284 | 282 | ||
285 | 283 |
github/deemru/w8io/169f3d6 158.68 ms ◑