tx · 8AtD5nsuAbCJCbKAhFYgjg7L745nZUCZqinHD4dNhKiJ 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy: -0.01300000 Waves 2022.10.17 18:58 [2276587] smart account 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy > SELF 0.00000000 Waves
{ "type": 13, "id": "8AtD5nsuAbCJCbKAhFYgjg7L745nZUCZqinHD4dNhKiJ", "fee": 1300000, "feeAssetId": null, "timestamp": 1666022334510, "version": 2, "chainId": 84, "sender": "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy", "senderPublicKey": "C3PaRKeL8AUKbwUqdniMQtThgcTh5DYHV1777Hkxy7rp", "proofs": [ "2ZWV25opzNb53Mvv75vy1ytSz3eBmPg1ZZtdLkcB2BXcHJbjUCca6FtVSXD2nhfNwWK4dHohjpCQyXoF6L2YqG5z" ], "script": "base64:BgIkCAISBAoCAQESBwoFCAgBARgSBwoFCAgBARgSAwoBARIDCgEBSgALcmV2aXNpb25OdW0CAAADU0VQAgJfXwAHTElTVFNFUAIBOgANREVGQVVMVFFVT1JVTQCgwh4AClVSTFBBVFRFUk4CGmh0dHBzOi8vZm9ydW0ubmV1dHJpbm8uYXQvAAhNQVhUSVRMRQCgAQAGTUFYVVJMAPoBAA1NQVhWT1RJTkdUSU1FAICQ5MAEAAVNVUxUNgDAhD0ADkRFRkFVTFRQQVlNRU5UAICU69wDABRERUZBVUxUQ1JFQVRJT05HTlNCVACAlOvcAwASZ292SWR4UHJvcG9zYWxUeElkAAEACmdvdklkeFR5cGUAAgAMZ292SWR4QXV0aG9yAAMACWdvdklkeFVybAAEAAtnb3ZJZHhUaXRsZQAFABJnb3ZJZHhDcmVhdGlvblRpbWUABgALZ292SWR4U3RhcnQABwAJZ292SWR4RW5kAAgAC2dvdklkeFR4SWRzAAkADGdvdklkeFF1b3J1bQAKAA1nb3ZJZHhPcHRpb25zAAsAE2dvdlN0YXR1c0lkeElzVmFsaWQAAQASZ292U3RhdHVzSWR4V2luT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1bml0AWkBC2FwcGx5Vm90aW5nAQpwcm9wb3NhbElkCQCUCgIFA25pbAUEdW5pdACii+yR", "height": 2276587, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9na4igWLsU8QpAT9zkgStt7kN8SX12sMtJ6eUxbedrAA Next: pswkQmDndHZJ2EJS2CxeD2gfG66M2qpa4eW8g3hDqcJ Diff:
Old | New | Differences | |
---|---|---|---|
265 | 265 | func bx (ak,bm,by,bz,bA,bB,bC) = { | |
266 | 266 | func bD (ba,bE) = { | |
267 | 267 | let ab = value(indexOf(bm, bE)) | |
268 | - | let bF = G(am(ak, ab), 0) | |
268 | + | let bF = if (by) | |
269 | + | then if ((ab == bB)) | |
270 | + | then bC | |
271 | + | else G(am(ak, ab), 0) | |
272 | + | else if ((ab == value(bz))) | |
273 | + | then bA | |
274 | + | else if ((ab == bB)) | |
275 | + | then bC | |
276 | + | else G(am(ak, ab), 0) | |
269 | 277 | if ((ba._2 > bF)) | |
270 | 278 | then ba | |
271 | 279 | else $Tuple2(ab, bF) | |
272 | 280 | } | |
273 | 281 | ||
274 | - | let bG = if (if (by) | |
275 | - | then true | |
276 | - | else (bC > bA)) | |
277 | - | then $Tuple2(bB, bC) | |
278 | - | else $Tuple2(value(bz), bA) | |
279 | 282 | let bc = bm | |
280 | 283 | let bd = size(bc) | |
281 | - | let be = | |
284 | + | let be = $Tuple2(0, 0) | |
282 | 285 | func bf (bg,bh) = if ((bh >= bd)) | |
283 | 286 | then bg | |
284 | 287 | else bD(bg, bc[bh]) | |
291 | 294 | } | |
292 | 295 | ||
293 | 296 | ||
294 | - | func | |
297 | + | func bG (bH,bI,bJ,bK) = makeString(["%b%d%d%d%b%d%b", toString(bI), toString(bJ._1), toString(bJ._2), toString(bK), bH[A], bH[B], bH[C]], b) | |
295 | 298 | ||
296 | 299 | ||
297 | 300 | @Callable(aC) | |
298 | - | func castVote (ak, | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | if (( | |
301 | + | func castVote (ak,bL) = { | |
302 | + | let bM = toString(aC.caller) | |
303 | + | let bN = split(D(this, aj(ak)), b) | |
304 | + | let bO = split(D(this, al(ak)), b) | |
305 | + | let bP = parseIntValue(bO[r]) | |
306 | + | let bQ = parseIntValue(bO[s]) | |
307 | + | let bR = lastBlock.timestamp | |
308 | + | if ((bP > bR)) | |
306 | 309 | then throw("Voting not started yet") | |
307 | - | else if (( | |
310 | + | else if ((bR >= bQ)) | |
308 | 311 | then throw("Voting already finished") | |
309 | - | else if (( | |
312 | + | else if ((bN[C] == "true")) | |
310 | 313 | then throw("Voting is canceled by team") | |
311 | 314 | else { | |
312 | - | let | |
313 | - | let | |
314 | - | if ((1 >= | |
315 | + | let bS = split(bO[v], c) | |
316 | + | let bT = size(bS) | |
317 | + | if ((1 >= bT)) | |
315 | 318 | then throw("Too few choices to vote") | |
316 | - | else if (( | |
317 | - | then throw(("Unknown choice! Must be 0.." + toString(( | |
319 | + | else if ((bL >= bT)) | |
320 | + | then throw(("Unknown choice! Must be 0.." + toString((bT - 1)))) | |
318 | 321 | else { | |
319 | - | let | |
320 | - | let | |
321 | - | if ((0 >= | |
322 | + | let bU = ax(invoke(ae, "gnsbtInfoSYSREADONLY", [bM, 0, 0], nil)) | |
323 | + | let bV = aB(bU[0]) | |
324 | + | if ((0 >= bV)) | |
322 | 325 | then throw("no gnsbt to vote") | |
323 | 326 | else { | |
324 | - | let bp = aB( | |
325 | - | let bz = getInteger(aq(ak, | |
326 | - | let | |
327 | + | let bp = aB(bU[1]) | |
328 | + | let bz = getInteger(aq(ak, bM)) | |
329 | + | let bW = if (!(isDefined(bz))) | |
327 | 330 | then 0 | |
328 | - | else G(ao(ak, | |
329 | - | let | |
331 | + | else G(ao(ak, bM), 0) | |
332 | + | let bX = if (isDefined(bz)) | |
330 | 333 | then G(am(ak, value(bz)), 0) | |
331 | 334 | else 0 | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | + | let bY = G(am(ak, bL), 0) | |
336 | + | let bZ = parseIntValue(bN[z]) | |
337 | + | let ca = if (!(isDefined(bz))) | |
335 | 338 | then 0 | |
336 | - | else (( | |
337 | - | then | |
339 | + | else ((bX - bW) + (if ((value(bz) == bL)) | |
340 | + | then bV | |
338 | 341 | else 0)) | |
339 | 342 | let bC = if (if (isDefined(bz)) | |
340 | - | then (value(bz) == | |
343 | + | then (value(bz) == bL) | |
341 | 344 | else false) | |
342 | - | then | |
343 | - | else ( | |
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
345 | + | then ca | |
346 | + | else (bY + bV) | |
347 | + | let cb = ((bZ - bW) + bV) | |
348 | + | let cc = (cb > parseIntValue(bO[u])) | |
349 | + | let cd = G(ar(ak), 0) | |
350 | + | let ce = G(as(), 0) | |
351 | + | let cf = getIntegerValue(ai()) | |
352 | + | let cg = if ((bW == 0)) | |
350 | 353 | then 1 | |
351 | 354 | else 0 | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | + | let ch = (ce + fraction(cg, i, cf)) | |
356 | + | let ci = G(at(), 0) | |
357 | + | let cj = (ci + ((bV - bW) / cf)) | |
355 | 358 | let by = if (!(isDefined(bz))) | |
356 | 359 | then true | |
357 | - | else (value(bz) == | |
360 | + | else (value(bz) == bL) | |
358 | 361 | let bA = if (by) | |
359 | 362 | then nil | |
360 | - | else [IntegerEntry(am(ak, value(bz)), | |
361 | - | let | |
362 | - | $Tuple2(([IntegerEntry(aq(ak, | |
363 | + | else [IntegerEntry(am(ak, value(bz)), ca)] | |
364 | + | let ck = bx(ak, bS, by, bz, ca, bL, bC) | |
365 | + | $Tuple2(([IntegerEntry(aq(ak, bM), bL), IntegerEntry(ao(ak, bM), bV), IntegerEntry(am(ak, bL), bC), IntegerEntry(ar(ak), (cd + cg)), IntegerEntry(as(), ch), IntegerEntry(at(), cj), StringEntry(aj(ak), bG(bN, cc, ck, cb))] ++ bA), unit) | |
363 | 366 | } | |
364 | 367 | } | |
365 | 368 | } | |
387 | 390 | func cancelVoting (ak) = if ((aC.caller != this)) | |
388 | 391 | then throw("not authorized") | |
389 | 392 | else { | |
390 | - | let | |
391 | - | let | |
392 | - | $Tuple2([StringEntry(aj(ak), | |
393 | + | let cl = D(this, aj(ak)) | |
394 | + | let cm = ((take(cl, value(lastIndexOf(cl, b))) + b) + "true") | |
395 | + | $Tuple2([StringEntry(aj(ak), cm)], unit) | |
393 | 396 | } | |
394 | 397 | ||
395 | 398 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = ":" | |
9 | 9 | ||
10 | 10 | let d = 500000 | |
11 | 11 | ||
12 | 12 | let e = "https://forum.neutrino.at/" | |
13 | 13 | ||
14 | 14 | let f = 160 | |
15 | 15 | ||
16 | 16 | let g = 250 | |
17 | 17 | ||
18 | 18 | let h = 1209600000 | |
19 | 19 | ||
20 | 20 | let i = 1000000 | |
21 | 21 | ||
22 | 22 | let j = 1000000000 | |
23 | 23 | ||
24 | 24 | let k = 1000000000 | |
25 | 25 | ||
26 | 26 | let l = 1 | |
27 | 27 | ||
28 | 28 | let m = 2 | |
29 | 29 | ||
30 | 30 | let n = 3 | |
31 | 31 | ||
32 | 32 | let o = 4 | |
33 | 33 | ||
34 | 34 | let p = 5 | |
35 | 35 | ||
36 | 36 | let q = 6 | |
37 | 37 | ||
38 | 38 | let r = 7 | |
39 | 39 | ||
40 | 40 | let s = 8 | |
41 | 41 | ||
42 | 42 | let t = 9 | |
43 | 43 | ||
44 | 44 | let u = 10 | |
45 | 45 | ||
46 | 46 | let v = 11 | |
47 | 47 | ||
48 | 48 | let w = 1 | |
49 | 49 | ||
50 | 50 | let x = 2 | |
51 | 51 | ||
52 | 52 | let y = 3 | |
53 | 53 | ||
54 | 54 | let z = 4 | |
55 | 55 | ||
56 | 56 | let A = 5 | |
57 | 57 | ||
58 | 58 | let B = 6 | |
59 | 59 | ||
60 | 60 | let C = 7 | |
61 | 61 | ||
62 | 62 | func D (E,F) = valueOrErrorMessage(getString(E, F), makeString(["mandatory ", toString(E), ".", F, " is not defined"], "")) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G (F,H) = valueOrElse(getInteger(this, F), H) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | let I = 1 | |
69 | 69 | ||
70 | 70 | let J = 2 | |
71 | 71 | ||
72 | 72 | let K = 3 | |
73 | 73 | ||
74 | 74 | let L = 4 | |
75 | 75 | ||
76 | 76 | let M = 5 | |
77 | 77 | ||
78 | 78 | let N = 6 | |
79 | 79 | ||
80 | 80 | let O = 7 | |
81 | 81 | ||
82 | 82 | let P = 8 | |
83 | 83 | ||
84 | 84 | let Q = 9 | |
85 | 85 | ||
86 | 86 | let R = 10 | |
87 | 87 | ||
88 | 88 | let S = 11 | |
89 | 89 | ||
90 | 90 | let T = 12 | |
91 | 91 | ||
92 | 92 | let U = 13 | |
93 | 93 | ||
94 | 94 | func V () = "%s%s__config__controlAddress" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func W () = "%s__controlConfig" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func X (Y) = split_4C(D(Y, W()), b) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func Z (aa,ab) = valueOrErrorMessage(addressFromString(aa[ab]), ("Control cfg doesn't contain address at index " + toString(ab))) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | let ac = addressFromStringValue(valueOrElse(getString(this, V()), "3P5Bfd58PPfNvBM2Hy8QfbcDqMeNtzg7KfP")) | |
107 | 107 | ||
108 | 108 | let aa = X(ac) | |
109 | 109 | ||
110 | 110 | let ad = Z(aa, I) | |
111 | 111 | ||
112 | 112 | let ae = Z(aa, S) | |
113 | 113 | ||
114 | 114 | func af () = "%s__quorumRequired" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func ag () = "%s__paymentRequired" | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func ah () = "%s__gNsbtRequired" | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func ai () = "%s__proposalId" | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func aj (ak) = ("%s%d__proposalStatusData__" + toString(ak)) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func al (ak) = ("%s%d__proposalData__" + toString(ak)) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func am (ak,an) = makeString(["%s%d%d", "votesByOpt", toString(ak), toString(an)], b) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func ao (ak,ap) = makeString(["%s%d%s", "votesByUser", toString(ak), ap], b) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func aq (ak,ap) = makeString(["%s%d%s", "optionByUser", toString(ak), ap], b) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func ar (ak) = ("%s%d__numVoters__" + toString(ak)) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func as () = "%s%s%s__stats__avg__uniqueVoters" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func at () = "%s%s%s__stats__avg__gnsbtVoted" | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func au () = "%s%s__stats__uniqueAuthors" | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func av (aw) = ("%s%s__numProposalsByAuthor__" + aw) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func ax (ay) = { | |
157 | 157 | let az = ay | |
158 | 158 | if ($isInstanceOf(az, "List[Any]")) | |
159 | 159 | then { | |
160 | 160 | let aA = az | |
161 | 161 | aA | |
162 | 162 | } | |
163 | 163 | else throw("fail to cast into List[Any]") | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func aB (ay) = { | |
168 | 168 | let az = ay | |
169 | 169 | if ($isInstanceOf(az, "Int")) | |
170 | 170 | then { | |
171 | 171 | let aC = az | |
172 | 172 | aC | |
173 | 173 | } | |
174 | 174 | else throw("fail to cast into Int") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func aD (aE,aF,aG,aH,aI,aJ,aK) = makeString(["%b%d%d%d%b%d%b", toString(aE), toString(aF), toString(aG), toString(aH), toString(aI), toString(aJ), toString(aK)], b) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func aL (aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW) = makeString(["%s%s%s%s%s%d%d%d%s%d%s", aM, aN, aO, aP, aQ, toString(aR), toString(aS), toString(aT), aU, toString(aV), aW], b) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func aX (aY) = if ((size(aY) > 20)) | |
185 | 185 | then throw(("Too many transactions: " + toString(size(aY)))) | |
186 | 186 | else { | |
187 | 187 | func aZ (ba,bb) = if (!(isDefined(transactionHeightById(fromBase58String(bb))))) | |
188 | 188 | then throw(("Wrong txId:" + bb)) | |
189 | 189 | else if ((ba == "")) | |
190 | 190 | then bb | |
191 | 191 | else ((ba + c) + bb) | |
192 | 192 | ||
193 | 193 | let bc = aY | |
194 | 194 | let bd = size(bc) | |
195 | 195 | let be = "" | |
196 | 196 | func bf (bg,bh) = if ((bh >= bd)) | |
197 | 197 | then bg | |
198 | 198 | else aZ(bg, bc[bh]) | |
199 | 199 | ||
200 | 200 | func bi (bg,bh) = if ((bh >= bd)) | |
201 | 201 | then bg | |
202 | 202 | else throw("List size exceeds 20") | |
203 | 203 | ||
204 | 204 | bi(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(be, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func bj (bk,aM,aN,aO,aP,aQ,aS,aT,bl,aY,bm) = if ((bk.assetId != unit)) | |
209 | 209 | then throw("Allowed WAVES payment only!") | |
210 | 210 | else { | |
211 | 211 | let bn = G(ag(), j) | |
212 | 212 | if ((bn > bk.amount)) | |
213 | 213 | then throw(("Payment attached should be at least " + toString(bn))) | |
214 | 214 | else if ((value(indexOf(aP, e)) != 0)) | |
215 | 215 | then throw("Invalid url") | |
216 | 216 | else if ((size(aP) > g)) | |
217 | 217 | then throw("Url too long!") | |
218 | 218 | else if ((aQ == "")) | |
219 | 219 | then throw("Title is empty") | |
220 | 220 | else if ((size(aQ) > f)) | |
221 | 221 | then throw("Too long title") | |
222 | 222 | else { | |
223 | 223 | let aR = lastBlock.timestamp | |
224 | 224 | if ((aR > aS)) | |
225 | 225 | then throw(((("votingStartTime=" + toString(aS)) + " < proposalTime=") + toString(aR))) | |
226 | 226 | else if ((aS > aT)) | |
227 | 227 | then throw(((("votingEndTime=" + toString(aT)) + " < votingStartTime=") + toString(aS))) | |
228 | 228 | else if (((aT - aS) > h)) | |
229 | 229 | then throw(((("Voting period exceeds max: " + toString((aT - aS))) + " > ") + toString(h))) | |
230 | 230 | else { | |
231 | 231 | let aU = if ((aN == "IDEA")) | |
232 | 232 | then "" | |
233 | 233 | else aX(aY) | |
234 | 234 | if ((1 >= size(bm))) | |
235 | 235 | then throw("Too few choices to vote") | |
236 | 236 | else { | |
237 | 237 | let bo = ax(invoke(ae, "gnsbtInfoSYSREADONLY", [aO, 0, 0], nil)) | |
238 | 238 | let bp = aB(bo[1]) | |
239 | 239 | let bq = aB(bo[0]) | |
240 | 240 | let br = G(ah(), k) | |
241 | 241 | if ((br > bq)) | |
242 | 242 | then throw((("You need at least " + toString(br)) + " to create voting")) | |
243 | 243 | else { | |
244 | 244 | let bs = invoke(ad, "acceptWaves", nil, [bk]) | |
245 | 245 | if ((bs == bs)) | |
246 | 246 | then { | |
247 | 247 | let bt = G(af(), d) | |
248 | 248 | let aV = fraction(bt, bp, i) | |
249 | 249 | let ak = (G(ai(), 0) + 1) | |
250 | 250 | let bu = (G(av(aO), 0) + 1) | |
251 | 251 | let bv = (G(au(), 0) + (if ((bu == 1)) | |
252 | 252 | then 1 | |
253 | 253 | else 0)) | |
254 | 254 | let bw = makeString(bm, c) | |
255 | 255 | $Tuple2([IntegerEntry(ai(), ak), StringEntry(aj(ak), aD(false, 0, 0, 0, false, 0, false)), StringEntry(al(ak), aL(aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, bw)), IntegerEntry(av(aO), bu), IntegerEntry(au(), bv)], aM) | |
256 | 256 | } | |
257 | 257 | else throw("Strict value is not equal to itself.") | |
258 | 258 | } | |
259 | 259 | } | |
260 | 260 | } | |
261 | 261 | } | |
262 | 262 | } | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func bx (ak,bm,by,bz,bA,bB,bC) = { | |
266 | 266 | func bD (ba,bE) = { | |
267 | 267 | let ab = value(indexOf(bm, bE)) | |
268 | - | let bF = G(am(ak, ab), 0) | |
268 | + | let bF = if (by) | |
269 | + | then if ((ab == bB)) | |
270 | + | then bC | |
271 | + | else G(am(ak, ab), 0) | |
272 | + | else if ((ab == value(bz))) | |
273 | + | then bA | |
274 | + | else if ((ab == bB)) | |
275 | + | then bC | |
276 | + | else G(am(ak, ab), 0) | |
269 | 277 | if ((ba._2 > bF)) | |
270 | 278 | then ba | |
271 | 279 | else $Tuple2(ab, bF) | |
272 | 280 | } | |
273 | 281 | ||
274 | - | let bG = if (if (by) | |
275 | - | then true | |
276 | - | else (bC > bA)) | |
277 | - | then $Tuple2(bB, bC) | |
278 | - | else $Tuple2(value(bz), bA) | |
279 | 282 | let bc = bm | |
280 | 283 | let bd = size(bc) | |
281 | - | let be = | |
284 | + | let be = $Tuple2(0, 0) | |
282 | 285 | func bf (bg,bh) = if ((bh >= bd)) | |
283 | 286 | then bg | |
284 | 287 | else bD(bg, bc[bh]) | |
285 | 288 | ||
286 | 289 | func bi (bg,bh) = if ((bh >= bd)) | |
287 | 290 | then bg | |
288 | 291 | else throw("List size exceeds 10") | |
289 | 292 | ||
290 | 293 | bi(bf(bf(bf(bf(bf(bf(bf(bf(bf(bf(be, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
291 | 294 | } | |
292 | 295 | ||
293 | 296 | ||
294 | - | func | |
297 | + | func bG (bH,bI,bJ,bK) = makeString(["%b%d%d%d%b%d%b", toString(bI), toString(bJ._1), toString(bJ._2), toString(bK), bH[A], bH[B], bH[C]], b) | |
295 | 298 | ||
296 | 299 | ||
297 | 300 | @Callable(aC) | |
298 | - | func castVote (ak, | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | if (( | |
301 | + | func castVote (ak,bL) = { | |
302 | + | let bM = toString(aC.caller) | |
303 | + | let bN = split(D(this, aj(ak)), b) | |
304 | + | let bO = split(D(this, al(ak)), b) | |
305 | + | let bP = parseIntValue(bO[r]) | |
306 | + | let bQ = parseIntValue(bO[s]) | |
307 | + | let bR = lastBlock.timestamp | |
308 | + | if ((bP > bR)) | |
306 | 309 | then throw("Voting not started yet") | |
307 | - | else if (( | |
310 | + | else if ((bR >= bQ)) | |
308 | 311 | then throw("Voting already finished") | |
309 | - | else if (( | |
312 | + | else if ((bN[C] == "true")) | |
310 | 313 | then throw("Voting is canceled by team") | |
311 | 314 | else { | |
312 | - | let | |
313 | - | let | |
314 | - | if ((1 >= | |
315 | + | let bS = split(bO[v], c) | |
316 | + | let bT = size(bS) | |
317 | + | if ((1 >= bT)) | |
315 | 318 | then throw("Too few choices to vote") | |
316 | - | else if (( | |
317 | - | then throw(("Unknown choice! Must be 0.." + toString(( | |
319 | + | else if ((bL >= bT)) | |
320 | + | then throw(("Unknown choice! Must be 0.." + toString((bT - 1)))) | |
318 | 321 | else { | |
319 | - | let | |
320 | - | let | |
321 | - | if ((0 >= | |
322 | + | let bU = ax(invoke(ae, "gnsbtInfoSYSREADONLY", [bM, 0, 0], nil)) | |
323 | + | let bV = aB(bU[0]) | |
324 | + | if ((0 >= bV)) | |
322 | 325 | then throw("no gnsbt to vote") | |
323 | 326 | else { | |
324 | - | let bp = aB( | |
325 | - | let bz = getInteger(aq(ak, | |
326 | - | let | |
327 | + | let bp = aB(bU[1]) | |
328 | + | let bz = getInteger(aq(ak, bM)) | |
329 | + | let bW = if (!(isDefined(bz))) | |
327 | 330 | then 0 | |
328 | - | else G(ao(ak, | |
329 | - | let | |
331 | + | else G(ao(ak, bM), 0) | |
332 | + | let bX = if (isDefined(bz)) | |
330 | 333 | then G(am(ak, value(bz)), 0) | |
331 | 334 | else 0 | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | + | let bY = G(am(ak, bL), 0) | |
336 | + | let bZ = parseIntValue(bN[z]) | |
337 | + | let ca = if (!(isDefined(bz))) | |
335 | 338 | then 0 | |
336 | - | else (( | |
337 | - | then | |
339 | + | else ((bX - bW) + (if ((value(bz) == bL)) | |
340 | + | then bV | |
338 | 341 | else 0)) | |
339 | 342 | let bC = if (if (isDefined(bz)) | |
340 | - | then (value(bz) == | |
343 | + | then (value(bz) == bL) | |
341 | 344 | else false) | |
342 | - | then | |
343 | - | else ( | |
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
345 | + | then ca | |
346 | + | else (bY + bV) | |
347 | + | let cb = ((bZ - bW) + bV) | |
348 | + | let cc = (cb > parseIntValue(bO[u])) | |
349 | + | let cd = G(ar(ak), 0) | |
350 | + | let ce = G(as(), 0) | |
351 | + | let cf = getIntegerValue(ai()) | |
352 | + | let cg = if ((bW == 0)) | |
350 | 353 | then 1 | |
351 | 354 | else 0 | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | + | let ch = (ce + fraction(cg, i, cf)) | |
356 | + | let ci = G(at(), 0) | |
357 | + | let cj = (ci + ((bV - bW) / cf)) | |
355 | 358 | let by = if (!(isDefined(bz))) | |
356 | 359 | then true | |
357 | - | else (value(bz) == | |
360 | + | else (value(bz) == bL) | |
358 | 361 | let bA = if (by) | |
359 | 362 | then nil | |
360 | - | else [IntegerEntry(am(ak, value(bz)), | |
361 | - | let | |
362 | - | $Tuple2(([IntegerEntry(aq(ak, | |
363 | + | else [IntegerEntry(am(ak, value(bz)), ca)] | |
364 | + | let ck = bx(ak, bS, by, bz, ca, bL, bC) | |
365 | + | $Tuple2(([IntegerEntry(aq(ak, bM), bL), IntegerEntry(ao(ak, bM), bV), IntegerEntry(am(ak, bL), bC), IntegerEntry(ar(ak), (cd + cg)), IntegerEntry(as(), ch), IntegerEntry(at(), cj), StringEntry(aj(ak), bG(bN, cc, ck, cb))] ++ bA), unit) | |
363 | 366 | } | |
364 | 367 | } | |
365 | 368 | } | |
366 | 369 | } | |
367 | 370 | ||
368 | 371 | ||
369 | 372 | ||
370 | 373 | @Callable(aC) | |
371 | 374 | func initiateIdeaVoting (aP,aQ,aS,aT,bm) = if ((size(aC.payments) != 1)) | |
372 | 375 | then throw("Exactly one payment required") | |
373 | 376 | else bj(value(aC.payments[0]), toBase58String(aC.transactionId), "IDEA", toString(aC.caller), aP, aQ, aS, aT, "PENDING", nil, bm) | |
374 | 377 | ||
375 | 378 | ||
376 | 379 | ||
377 | 380 | @Callable(aC) | |
378 | 381 | func initiateUpdateVoting (aP,aQ,aS,aT,aY) = if ((size(aC.payments) != 1)) | |
379 | 382 | then throw("Exactly one payment required") | |
380 | 383 | else if ((1 > size(aY))) | |
381 | 384 | then throw("Transactions list is empty") | |
382 | 385 | else bj(value(aC.payments[0]), toBase58String(aC.transactionId), "UPDATE", toString(aC.caller), aP, aQ, aS, aT, "PENDING", aY, ["NO", "YES"]) | |
383 | 386 | ||
384 | 387 | ||
385 | 388 | ||
386 | 389 | @Callable(aC) | |
387 | 390 | func cancelVoting (ak) = if ((aC.caller != this)) | |
388 | 391 | then throw("not authorized") | |
389 | 392 | else { | |
390 | - | let | |
391 | - | let | |
392 | - | $Tuple2([StringEntry(aj(ak), | |
393 | + | let cl = D(this, aj(ak)) | |
394 | + | let cm = ((take(cl, value(lastIndexOf(cl, b))) + b) + "true") | |
395 | + | $Tuple2([StringEntry(aj(ak), cm)], unit) | |
393 | 396 | } | |
394 | 397 | ||
395 | 398 | ||
396 | 399 | ||
397 | 400 | @Callable(aC) | |
398 | 401 | func applyVoting (ak) = $Tuple2(nil, unit) | |
399 | 402 | ||
400 | 403 |
github/deemru/w8io/169f3d6 182.06 ms ◑