tx · 2x1A7Fhbat8D1mqPEkMks2CJitbPc9tTewpwXW2g1hgd 3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc: -0.02400000 Waves 2023.04.17 12:16 [2538371] smart account 3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc > SELF 0.00000000 Waves
{ "type": 13, "id": "2x1A7Fhbat8D1mqPEkMks2CJitbPc9tTewpwXW2g1hgd", "fee": 2400000, "feeAssetId": null, "timestamp": 1681722999413, "version": 2, "chainId": 84, "sender": "3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc", "senderPublicKey": "242mibE5dTci8wD6vghuCGxjDZdnNJr88H7gcWWehpEX", "proofs": [ "3Noa92i1HgnybGDsZBUG9evk75CL1CxP9LcwvrovVwBCcj6NXkcCD9gJXqToWfrActW3Rvfpd2r7fre2Kw8p62SZ" ], "script": "base64:BgI1CAISBwoFCAEBAQESBAoCAQESBwoFCAgBARgSBwoFCAgBARgSAwoBARIDCgEBEgASBAoCAQhcAAtyZXZpc2lvbk51bQIAAANTRVACAl9fAAdMSVNUU0VQAgE6AA1ERUZBVUxUUVVPUlVNAKDCHgAKVVJMUEFUVEVSTgIaaHR0cHM6Ly9mb3J1bS5uZXV0cmluby5hdC8ACE1BWFRJVExFAPoBAAZNQVhVUkwA+gEADU1BWFZPVElOR1RJTUUAgJDkwAQABU1VTFQ2AMCEPQAOREVGQVVMVFBBWU1FTlQAgJTr3AMAFERFRkFVTFRDUkVBVElPTkdOU0JUAICU69wDAApQQVNUTUFSR0lOAIC6twMADEZVVFVSRU1BUkdJTgDAy8kCABRERUZBVUxURklSU1RQUk9QT1NBTABvABJnb3ZJZHhQcm9wb3NhbFR4SWQAAQAKZ292SWR4VHlwZQACAAxnb3ZJZHhBdXRob3IAAwAJZ292SWR4VXJsAAQAC2dvdklkeFRpdGxlAAUAEmdvdklkeENyZWF0aW9uVGltZQAGAAtnb3ZJZHhTdGFydAAHAAlnb3ZJZHhFbmQACAALZ292SW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CKtceNRnMcWRupXv Diff:
Old | New | Differences | |
---|---|---|---|
111 | 111 | func ad (ae,af) = valueOrErrorMessage(addressFromString(ae[af]), ("Control cfg doesn't contain address at index " + toString(af))) | |
112 | 112 | ||
113 | 113 | ||
114 | - | let ag = addressFromStringValue(valueOrElse(getString(this, Z()), " | |
114 | + | let ag = addressFromStringValue(valueOrElse(getString(this, Z()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
115 | 115 | ||
116 | 116 | let ae = ab(ag) | |
117 | 117 | ||
121 | 121 | ||
122 | 122 | let aj = ad(ae, V) | |
123 | 123 | ||
124 | - | func ak ( | |
124 | + | func ak () = "%s__lastBase58Proposal" | |
125 | 125 | ||
126 | 126 | ||
127 | - | func | |
127 | + | func al (am) = ("%s%s__quorumRequired__" + am) | |
128 | 128 | ||
129 | 129 | ||
130 | - | func an () = "%s__ | |
130 | + | func an () = "%s__paymentRequired" | |
131 | 131 | ||
132 | 132 | ||
133 | - | func ao () = "%s__ | |
133 | + | func ao () = "%s__gNsbtRequired" | |
134 | 134 | ||
135 | 135 | ||
136 | - | func ap () = "%s__ | |
136 | + | func ap () = "%s__proposalId" | |
137 | 137 | ||
138 | 138 | ||
139 | - | func aq () = "%s__ | |
139 | + | func aq () = "%s__firstProposalId" | |
140 | 140 | ||
141 | 141 | ||
142 | - | func ar ( | |
142 | + | func ar () = "%s__updateVersion" | |
143 | 143 | ||
144 | 144 | ||
145 | - | func | |
145 | + | func as (at) = ("%s%d__proposalStatusData__" + toString(at)) | |
146 | 146 | ||
147 | 147 | ||
148 | - | func au ( | |
148 | + | func au (at) = ("%s%d__proposalData__" + toString(at)) | |
149 | 149 | ||
150 | 150 | ||
151 | - | func | |
151 | + | func av (at,aw) = makeString(["%s%d%d", "votesByOpt", toString(at), toString(aw)], b) | |
152 | 152 | ||
153 | 153 | ||
154 | - | func | |
154 | + | func ax (at,ay) = makeString(["%s%d%s", "votesByUser", toString(at), ay], b) | |
155 | 155 | ||
156 | 156 | ||
157 | - | func az () = "%s | |
157 | + | func az (at,ay) = makeString(["%s%d%s", "optionByUser", toString(at), ay], b) | |
158 | 158 | ||
159 | 159 | ||
160 | - | func aA ( | |
160 | + | func aA () = "%s__applyInProgress" | |
161 | 161 | ||
162 | 162 | ||
163 | - | func | |
163 | + | func aB (aC) = ("%s%d__proposalIdByTopicId__" + toString(aC)) | |
164 | 164 | ||
165 | 165 | ||
166 | - | func aD ( | |
166 | + | func aD (ay) = ("%s%s_userGnsbtReleaseTime__" + ay) | |
167 | 167 | ||
168 | 168 | ||
169 | - | func aE () = "%s% | |
169 | + | func aE (at) = ("%s%d__numVoters__" + toString(at)) | |
170 | 170 | ||
171 | 171 | ||
172 | - | func aF () = "%s%s%s__stats__avg__ | |
172 | + | func aF () = "%s%s%s__stats__avg__uniqueVoters" | |
173 | 173 | ||
174 | 174 | ||
175 | - | func aG () = "%s%s__stats__ | |
175 | + | func aG () = "%s%s%s__stats__avg__gnsbtVoted" | |
176 | 176 | ||
177 | 177 | ||
178 | - | func aH ( | |
178 | + | func aH () = "%s%s__stats__uniqueAuthors" | |
179 | 179 | ||
180 | 180 | ||
181 | - | func | |
181 | + | func aI (aJ) = ("%s%s__numProposalsByAuthor__" + aJ) | |
182 | 182 | ||
183 | 183 | ||
184 | - | func aL (aM) = { | |
185 | - | let aN = aM | |
186 | - | if ($isInstanceOf(aN, "List[Any]")) | |
184 | + | func aK (aL) = ("%s%d__applyHistory__" + toString(aL)) | |
185 | + | ||
186 | + | ||
187 | + | func aM (aN) = { | |
188 | + | let aO = aN | |
189 | + | if ($isInstanceOf(aO, "List[Any]")) | |
187 | 190 | then { | |
188 | - | let | |
189 | - | | |
191 | + | let aP = aO | |
192 | + | aP | |
190 | 193 | } | |
191 | 194 | else throw("fail to cast into List[Any]") | |
192 | 195 | } | |
193 | 196 | ||
194 | 197 | ||
195 | - | func | |
196 | - | let | |
197 | - | if ($isInstanceOf( | |
198 | + | func aQ (aN) = { | |
199 | + | let aO = aN | |
200 | + | if ($isInstanceOf(aO, "Int")) | |
198 | 201 | then { | |
199 | - | let | |
200 | - | | |
202 | + | let aR = aO | |
203 | + | aR | |
201 | 204 | } | |
202 | 205 | else throw("fail to cast into Int") | |
203 | 206 | } | |
204 | 207 | ||
205 | 208 | ||
206 | - | func | |
209 | + | func aS (aT,aU,aV,aW,aX,aY,aZ,ba) = makeString(["%b%d%d%d%b%d%b%s", toString(aT), toString(aU), toString(aV), toString(aW), toString(aX), toString(aY), toString(aZ), ba], b) | |
207 | 210 | ||
208 | 211 | ||
209 | - | func | |
212 | + | func bb (bc,am,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%s%s%s%s%s%d%d%d%s%d%s", bc, am, bd, be, bf, toString(bg), toString(bh), toString(bi), bj, toString(bk), bl], b) | |
210 | 213 | ||
211 | 214 | ||
212 | - | func | |
213 | - | then throw(("Too many transactions: " + toString(size( | |
215 | + | func bm (bn) = if ((size(bn) > 20)) | |
216 | + | then throw(("Too many transactions: " + toString(size(bn)))) | |
214 | 217 | else { | |
215 | - | func | |
216 | - | then throw(("Wrong txId: " + | |
217 | - | else if (( | |
218 | - | then | |
219 | - | else (( | |
218 | + | func bo (bp,bq) = if ((size(fromBase58String(bq)) != 32)) | |
219 | + | then throw(("Wrong txId: " + bq)) | |
220 | + | else if ((bp == "")) | |
221 | + | then bq | |
222 | + | else ((bp + c) + bq) | |
220 | 223 | ||
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | func | |
225 | - | then | |
226 | - | else | |
224 | + | let br = bn | |
225 | + | let bs = size(br) | |
226 | + | let bt = "" | |
227 | + | func bu (bv,bw) = if ((bw >= bs)) | |
228 | + | then bv | |
229 | + | else bo(bv, br[bw]) | |
227 | 230 | ||
228 | - | func | |
229 | - | then | |
231 | + | func bx (bv,bw) = if ((bw >= bs)) | |
232 | + | then bv | |
230 | 233 | else throw("List size exceeds 20") | |
231 | 234 | ||
232 | - | | |
235 | + | bx(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bt, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
233 | 236 | } | |
234 | 237 | ||
235 | 238 | ||
236 | - | let | |
239 | + | let by = 0 | |
237 | 240 | ||
238 | - | let | |
241 | + | let bz = 1 | |
239 | 242 | ||
240 | - | func | |
241 | - | let | |
242 | - | then invoke(aj, "updateVotingPower", [ | |
243 | + | func bA (bB) = { | |
244 | + | let bC = if (isDefined(addressFromString(bB))) | |
245 | + | then invoke(aj, "updateVotingPower", [bB], nil) | |
243 | 246 | else unit | |
244 | - | if (( | |
247 | + | if ((bC == bC)) | |
245 | 248 | then { | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | [(bF + bH) | |
249 | + | let bD = aM(invoke(ai, "gnsbtInfoSYSREADONLY", [bB, 0, 0], nil)) | |
250 | + | let bE = aM(bD[2]) | |
251 | + | let bF = aQ(bE[2]) | |
252 | + | let bG = aQ(bE[3]) | |
253 | + | let bH = aQ(bD[9]) | |
254 | + | let bI = aQ(bD[6]) | |
255 | + | [(bG + bI), (bF + bH)] | |
253 | 256 | } | |
254 | 257 | else throw("Strict value is not equal to itself.") | |
255 | 258 | } | |
256 | 259 | ||
257 | 260 | ||
258 | - | func | |
261 | + | func bJ (bK) = if ((value(indexOf(bK, e)) != 0)) | |
259 | 262 | then throw("Invalid url") | |
260 | - | else if ((size( | |
263 | + | else if ((size(bK) > g)) | |
261 | 264 | then throw("Url too long!") | |
262 | 265 | else { | |
263 | - | let | |
264 | - | let | |
265 | - | if (isDefined( | |
266 | - | then throw(("Voting with such forum link is already registered by id=" + toString(value( | |
267 | - | else | |
266 | + | let aC = valueOrErrorMessage(parseInt(drop(bK, (value(lastIndexOf(bK, "/")) + 1))), "Wrong topicId") | |
267 | + | let bL = getInteger(aB(aC)) | |
268 | + | if (isDefined(bL)) | |
269 | + | then throw(("Voting with such forum link is already registered by id=" + toString(value(bL)))) | |
270 | + | else aC | |
268 | 271 | } | |
269 | 272 | ||
270 | 273 | ||
271 | - | func | |
274 | + | func bM (bN,bc,am,bd,be,bf,bh,bi,bO,bn,bP) = if ((bN.assetId != unit)) | |
272 | 275 | then throw("Allowed WAVES payment only!") | |
273 | 276 | else { | |
274 | - | let | |
275 | - | if (( | |
276 | - | then throw(("Payment attached should be at least " + toString( | |
277 | + | let bQ = K(an(), j) | |
278 | + | if ((bQ > bN.amount)) | |
279 | + | then throw(("Payment attached should be at least " + toString(bQ))) | |
277 | 280 | else { | |
278 | - | let | |
279 | - | if (( | |
281 | + | let aC = bJ(be) | |
282 | + | if ((bf == "")) | |
280 | 283 | then throw("Title is empty") | |
281 | - | else if ((size( | |
284 | + | else if ((size(bf) > f)) | |
282 | 285 | then throw("Too long title") | |
283 | 286 | else { | |
284 | - | let | |
285 | - | if (( | |
286 | - | then throw(((("votingStartTime=" + toString( | |
287 | - | else if (( | |
288 | - | then throw(((("votingEndTime=" + toString( | |
289 | - | else if ((( | |
290 | - | then throw(((("Voting period exceeds max: " + toString(( | |
287 | + | let bg = lastBlock.timestamp | |
288 | + | if ((bg > bh)) | |
289 | + | then throw(((("votingStartTime=" + toString(bh)) + " < proposalTime=") + toString(bg))) | |
290 | + | else if ((bh > bi)) | |
291 | + | then throw(((("votingEndTime=" + toString(bi)) + " < votingStartTime=") + toString(bh))) | |
292 | + | else if (((bi - bh) > h)) | |
293 | + | then throw(((("Voting period exceeds max: " + toString((bi - bh))) + " > ") + toString(h))) | |
291 | 294 | else { | |
292 | - | let | |
295 | + | let bj = if ((am == "IDEA")) | |
293 | 296 | then "" | |
294 | - | else | |
295 | - | if ((1 >= size( | |
297 | + | else bm(bn) | |
298 | + | if ((1 >= size(bP))) | |
296 | 299 | then throw("Too few choices to vote") | |
297 | 300 | else { | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | if (( | |
303 | - | then throw((("You need at least " + toString( | |
301 | + | let bR = bA(bd) | |
302 | + | let bS = bR[by] | |
303 | + | let bT = bR[bz] | |
304 | + | let bU = K(ao(), k) | |
305 | + | if ((bU > bT)) | |
306 | + | then throw((("You need at least " + toString(bU)) + " gNsbt to create voting")) | |
304 | 307 | else { | |
305 | - | let | |
306 | - | if (( | |
308 | + | let bV = invoke(ah, "acceptWaves", nil, [bN]) | |
309 | + | if ((bV == bV)) | |
307 | 310 | then { | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
311 | + | let bW = K(al(am), d) | |
312 | + | let bk = fraction(bW, bS, i) | |
313 | + | let at = (K(ap(), 0) + 1) | |
314 | + | let bX = (K(aI(bd), 0) + 1) | |
315 | + | let bY = (K(aH(), 0) + (if ((bX == 1)) | |
313 | 316 | then 1 | |
314 | 317 | else 0)) | |
315 | - | let bY = makeString(bO, c) | |
316 | - | $Tuple2([IntegerEntry(ao(), as), IntegerEntry(aA(aB), as), StringEntry(ar(as), aR(false, 0, 0, 0, false, bh, false, "ACTIVE")), StringEntry(at(as), ba(bb, al, bc, toBase58String(toBytes(bd)), toBase58String(toBytes(be)), bf, bg, bh, bi, bj, bY)), IntegerEntry(aH(bc), bW), IntegerEntry(aG(), bX)], bb) | |
318 | + | let bZ = makeString(bP, c) | |
319 | + | let ca = getInteger(ak()) | |
320 | + | let cb = if ((ca != unit)) | |
321 | + | then nil | |
322 | + | else [IntegerEntry(ak(), (at - 1))] | |
323 | + | $Tuple2(([IntegerEntry(ap(), at), IntegerEntry(aB(aC), at), StringEntry(as(at), aS(false, 0, 0, 0, false, bi, false, "ACTIVE")), StringEntry(au(at), bb(bc, am, bd, toBase16String(toBytes(be)), toBase16String(toBytes(bf)), bg, bh, bi, bj, bk, bZ)), IntegerEntry(aI(bd), bX), IntegerEntry(aH(), bY)] ++ cb), bc) | |
317 | 324 | } | |
318 | 325 | else throw("Strict value is not equal to itself.") | |
319 | 326 | } | |
324 | 331 | } | |
325 | 332 | ||
326 | 333 | ||
327 | - | func | |
328 | - | func | |
329 | - | let af = value(indexOf( | |
330 | - | let | |
331 | - | then if ((af == | |
332 | - | then | |
333 | - | else K( | |
334 | - | else if ((af == value( | |
335 | - | then | |
336 | - | else if ((af == | |
337 | - | then | |
338 | - | else K( | |
339 | - | if (( | |
340 | - | then | |
341 | - | else $Tuple2(af, | |
334 | + | func cc (at,bP,cd,ce,cf,cg,ch) = { | |
335 | + | func ci (bp,cj) = { | |
336 | + | let af = value(indexOf(bP, cj)) | |
337 | + | let ck = if (cd) | |
338 | + | then if ((af == cg)) | |
339 | + | then ch | |
340 | + | else K(av(at, af), 0) | |
341 | + | else if ((af == value(ce))) | |
342 | + | then cf | |
343 | + | else if ((af == cg)) | |
344 | + | then ch | |
345 | + | else K(av(at, af), 0) | |
346 | + | if ((bp._2 > ck)) | |
347 | + | then bp | |
348 | + | else $Tuple2(af, ck) | |
342 | 349 | } | |
343 | 350 | ||
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | func | |
348 | - | then | |
349 | - | else | |
351 | + | let br = bP | |
352 | + | let bs = size(br) | |
353 | + | let bt = $Tuple2(0, 0) | |
354 | + | func bu (bv,bw) = if ((bw >= bs)) | |
355 | + | then bv | |
356 | + | else ci(bv, br[bw]) | |
350 | 357 | ||
351 | - | func | |
352 | - | then | |
358 | + | func bx (bv,bw) = if ((bw >= bs)) | |
359 | + | then bv | |
353 | 360 | else throw("List size exceeds 10") | |
354 | 361 | ||
355 | - | | |
362 | + | bx(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bt, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
356 | 363 | } | |
357 | 364 | ||
358 | 365 | ||
359 | - | func | |
366 | + | func cl (cm,cn,co,cp) = makeString(["%b%d%d%d%b%d%b%s", toString(cn), toString(co._1), toString(co._2), toString(cp), cm[D], cm[E], cm[F], cm[G]], b) | |
360 | 367 | ||
361 | 368 | ||
362 | - | func | |
369 | + | func cq (cm) = makeString(["%b%d%d%d%b%d%b%s", cm[z], cm[A], cm[B], cm[C], "true", cm[E], cm[F], cm[G]], b) | |
363 | 370 | ||
364 | 371 | ||
365 | - | func | |
366 | - | let | |
367 | - | let | |
368 | - | StringEntry( | |
372 | + | func cr (cs,bf,bK,at) = { | |
373 | + | let bS = bA("")[by] | |
374 | + | let ct = 500000 | |
375 | + | StringEntry(aK(lastBlock.timestamp), makeString(["%d%d%d%s%s%d", toString(cs), toString(bS), toString(ct), bf, bK, toString(at)], b)) | |
369 | 376 | } | |
370 | 377 | ||
371 | 378 | ||
372 | - | @Callable( | |
373 | - | func constructorV1 ( | |
379 | + | @Callable(aR) | |
380 | + | func constructorV1 (cu,cv,cw,cx,cy) = if ((aR.caller != this)) | |
374 | 381 | then throw("Permission denied") | |
375 | - | else [StringEntry(Z(), | |
382 | + | else [StringEntry(Z(), cu), IntegerEntry(ao(), cv), IntegerEntry(an(), cw), IntegerEntry(al("IDEA"), cx), IntegerEntry(al("UPDATE"), cy)] | |
376 | 383 | ||
377 | 384 | ||
378 | 385 | ||
379 | - | @Callable( | |
380 | - | func castVote ( | |
381 | - | let | |
382 | - | let | |
383 | - | if (( | |
386 | + | @Callable(aR) | |
387 | + | func castVote (at,cz) = { | |
388 | + | let cA = toString(aR.caller) | |
389 | + | let cB = split(H(this, as(at)), b) | |
390 | + | if ((cB[F] == "true")) | |
384 | 391 | then throw("Voting is canceled by team") | |
385 | 392 | else { | |
386 | - | let | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | if (( | |
393 | + | let cC = split(H(this, au(at)), b) | |
394 | + | let cD = parseIntValue(cC[u]) | |
395 | + | let cE = parseIntValue(cC[v]) | |
396 | + | let cF = lastBlock.timestamp | |
397 | + | if ((cD > cF)) | |
391 | 398 | then throw("Voting not started yet") | |
392 | - | else if (( | |
399 | + | else if ((cF >= cE)) | |
393 | 400 | then throw("Voting already finished") | |
394 | 401 | else { | |
395 | - | let | |
396 | - | let | |
397 | - | if ((1 >= | |
402 | + | let cG = split(cC[y], c) | |
403 | + | let cH = size(cG) | |
404 | + | if ((1 >= cH)) | |
398 | 405 | then throw("Too few choices to vote") | |
399 | - | else if (( | |
400 | - | then throw(("Unknown choice! Must be 0.." + toString(( | |
406 | + | else if ((cz >= cH)) | |
407 | + | then throw(("Unknown choice! Must be 0.." + toString((cH - 1)))) | |
401 | 408 | else { | |
402 | - | let | |
403 | - | let | |
404 | - | if ((0 >= | |
409 | + | let bR = bA(cA) | |
410 | + | let cI = bR[bz] | |
411 | + | if ((0 >= cI)) | |
405 | 412 | then throw("no gnsbt to vote") | |
406 | 413 | else { | |
407 | - | let | |
408 | - | let | |
409 | - | let | |
414 | + | let bS = bR[by] | |
415 | + | let ce = getInteger(az(at, cA)) | |
416 | + | let cJ = if (!(isDefined(ce))) | |
410 | 417 | then 0 | |
411 | - | else K( | |
412 | - | let | |
413 | - | then K( | |
418 | + | else K(ax(at, cA), 0) | |
419 | + | let cK = if (isDefined(ce)) | |
420 | + | then K(av(at, value(ce)), 0) | |
414 | 421 | else 0 | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
422 | + | let cL = K(av(at, cz), 0) | |
423 | + | let cM = parseIntValue(cB[C]) | |
424 | + | let cN = if (!(isDefined(ce))) | |
418 | 425 | then 0 | |
419 | - | else (( | |
420 | - | then | |
426 | + | else ((cK - cJ) + (if ((value(ce) == cz)) | |
427 | + | then cI | |
421 | 428 | else 0)) | |
422 | - | let | |
423 | - | then (value( | |
429 | + | let ch = if (if (isDefined(ce)) | |
430 | + | then (value(ce) == cz) | |
424 | 431 | else false) | |
425 | - | then | |
426 | - | else ( | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | let | |
432 | + | then cN | |
433 | + | else (cL + cI) | |
434 | + | let cO = ((cM - cJ) + cI) | |
435 | + | let cP = (cO >= parseIntValue(cC[x])) | |
436 | + | let cQ = K(aE(at), 0) | |
437 | + | let cR = K(aF(), 0) | |
438 | + | let cS = ((getIntegerValue(ap()) - valueOrElse(getInteger(aq()), n)) + 1) | |
439 | + | let cT = if ((cJ == 0)) | |
433 | 440 | then 1 | |
434 | 441 | else 0 | |
435 | - | let | |
436 | - | let | |
437 | - | let | |
438 | - | let | |
442 | + | let cU = (cR + fraction(cT, i, cS)) | |
443 | + | let cV = K(aG(), 0) | |
444 | + | let cW = (cV + ((cI - cJ) / cS)) | |
445 | + | let cd = if (!(isDefined(ce))) | |
439 | 446 | then true | |
440 | - | else (value( | |
441 | - | let | |
447 | + | else (value(ce) == cz) | |
448 | + | let cf = if (cd) | |
442 | 449 | then nil | |
443 | - | else [IntegerEntry( | |
444 | - | let | |
445 | - | let | |
446 | - | $Tuple2(([IntegerEntry( | |
450 | + | else [IntegerEntry(av(at, value(ce)), cN)] | |
451 | + | let cX = cc(at, cG, cd, ce, cN, cz, ch) | |
452 | + | let cY = max([cE, K(aD(cA), 0)]) | |
453 | + | $Tuple2(([IntegerEntry(az(at, cA), cz), IntegerEntry(ax(at, cA), cI), IntegerEntry(av(at, cz), ch), IntegerEntry(aE(at), (cQ + cT)), IntegerEntry(aD(cA), cY), IntegerEntry(aF(), cU), IntegerEntry(aG(), cW), StringEntry(as(at), cl(cB, cP, cX, cO))] ++ cf), unit) | |
447 | 454 | } | |
448 | 455 | } | |
449 | 456 | } | |
452 | 459 | ||
453 | 460 | ||
454 | 461 | ||
455 | - | @Callable( | |
456 | - | func initiateIdeaVoting ( | |
462 | + | @Callable(aR) | |
463 | + | func initiateIdeaVoting (be,bf,bh,bi,bP) = if ((size(aR.payments) != 1)) | |
457 | 464 | then throw("Exactly one payment required") | |
458 | - | else if ((size( | |
465 | + | else if ((size(bP) != 2)) | |
459 | 466 | then throw("Exactly 2 option ['NO', 'YES'] are expected") | |
460 | - | else if (( | |
467 | + | else if ((bP[0] != "NO")) | |
461 | 468 | then throw("Option NO should be the first") | |
462 | - | else if (( | |
469 | + | else if ((bP[1] != "YES")) | |
463 | 470 | then throw("Option YES should be the second") | |
464 | - | else | |
471 | + | else bM(value(aR.payments[0]), toBase58String(aR.transactionId), "IDEA", toString(aR.caller), be, bf, bh, bi, "PENDING", nil, bP) | |
465 | 472 | ||
466 | 473 | ||
467 | 474 | ||
468 | - | @Callable( | |
469 | - | func initiateUpdateVoting ( | |
475 | + | @Callable(aR) | |
476 | + | func initiateUpdateVoting (be,bf,bh,bi,bn) = if ((size(aR.payments) != 1)) | |
470 | 477 | then throw("Exactly one payment required") | |
471 | - | else if ((1 > size( | |
478 | + | else if ((1 > size(bn))) | |
472 | 479 | then throw("Transactions list is empty") | |
473 | - | else if (( | |
480 | + | else if ((aR.caller != this)) | |
474 | 481 | then throw("not authorized") | |
475 | - | else | |
482 | + | else bM(value(aR.payments[0]), toBase58String(aR.transactionId), "UPDATE", toString(aR.caller), be, bf, bh, bi, "PENDING", bn, ["NO", "YES"]) | |
476 | 483 | ||
477 | 484 | ||
478 | 485 | ||
479 | - | @Callable( | |
480 | - | func cancelVoting ( | |
486 | + | @Callable(aR) | |
487 | + | func cancelVoting (at) = if ((aR.caller != this)) | |
481 | 488 | then throw("not authorized") | |
482 | 489 | else { | |
483 | - | let | |
484 | - | let | |
485 | - | $Tuple2([StringEntry( | |
490 | + | let cZ = H(this, as(at)) | |
491 | + | let da = ((take(cZ, value(lastIndexOf(cZ, b))) + b) + "true") | |
492 | + | $Tuple2([StringEntry(as(at), da)], unit) | |
486 | 493 | } | |
487 | 494 | ||
488 | 495 | ||
489 | 496 | ||
490 | - | @Callable( | |
491 | - | func applyUpdate ( | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | if (( | |
497 | + | @Callable(aR) | |
498 | + | func applyUpdate (at) = { | |
499 | + | let cC = split(H(this, au(at)), b) | |
500 | + | let cE = parseIntValue(cC[v]) | |
501 | + | let cF = lastBlock.timestamp | |
502 | + | if ((cE > cF)) | |
496 | 503 | then throw("Voting is not finished yet") | |
497 | - | else if (("UPDATE" != | |
504 | + | else if (("UPDATE" != cC[p])) | |
498 | 505 | then throw("Only UPDATE type can be applied") | |
499 | 506 | else { | |
500 | - | let | |
501 | - | if (( | |
507 | + | let cB = split(H(this, as(at)), b) | |
508 | + | if ((cB[F] == "true")) | |
502 | 509 | then throw("Voting is canceled") | |
503 | - | else if (( | |
510 | + | else if ((cB[z] != "true")) | |
504 | 511 | then throw("Voting status invalid") | |
505 | - | else if (( | |
512 | + | else if ((cB[A] != "1")) | |
506 | 513 | then throw("Winner is 'NO' - nothing to apply") | |
507 | - | else if (( | |
514 | + | else if ((cB[D] == "true")) | |
508 | 515 | then throw("Scripts are already applied") | |
509 | 516 | else { | |
510 | - | let | |
511 | - | if ((( | |
512 | - | then throw((("Scripts timestamp=" + toString( | |
513 | - | else if (( | |
514 | - | then throw((("Scripts timestamp=" + toString( | |
517 | + | let db = parseIntValue(cB[E]) | |
518 | + | if (((cF - l) > db)) | |
519 | + | then throw((("Scripts timestamp=" + toString(db)) + " is too far in the past, max 2 hrs allowed")) | |
520 | + | else if ((db > (cF + m))) | |
521 | + | then throw((("Scripts timestamp=" + toString(db)) + " is too far in the future, max 1.5 hrs allowed")) | |
515 | 522 | else { | |
516 | - | let | |
517 | - | if (( | |
518 | - | then throw((("proposalId=" + toString( | |
523 | + | let dc = K(aA(), -1) | |
524 | + | if ((dc != -1)) | |
525 | + | then throw((("proposalId=" + toString(dc)) + " is already being applied. Finish it first!")) | |
519 | 526 | else { | |
520 | - | let | |
521 | - | if (( | |
522 | - | then $Tuple2([IntegerEntry( | |
527 | + | let dd = invoke(ag, "callEmergencyShutdown", ["Applying Governance UPDATE"], nil) | |
528 | + | if ((dd == dd)) | |
529 | + | then $Tuple2([IntegerEntry(aA(), at)], unit) | |
523 | 530 | else throw("Strict value is not equal to itself.") | |
524 | 531 | } | |
525 | 532 | } | |
529 | 536 | ||
530 | 537 | ||
531 | 538 | ||
532 | - | @Callable( | |
539 | + | @Callable(aR) | |
533 | 540 | func finishApply () = { | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | if (( | |
541 | + | let at = valueOrErrorMessage(getInteger(aA()), "No apply in progress, nothing to finish") | |
542 | + | let cC = split(H(this, au(at)), b) | |
543 | + | let bn = split(cC[w], c) | |
544 | + | let cB = split(H(this, as(at)), b) | |
545 | + | if ((cB[D] == "true")) | |
539 | 546 | then throw("Scripts are already applied") | |
540 | 547 | else { | |
541 | - | func | |
542 | - | then throw(("NOT applied txId: " + | |
548 | + | func de (bp,bq) = if (!(isDefined(transactionHeightById(fromBase58String(bq))))) | |
549 | + | then throw(("NOT applied txId: " + bq)) | |
543 | 550 | else unit | |
544 | 551 | ||
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | func | |
550 | - | then | |
551 | - | else | |
552 | + | let df = { | |
553 | + | let br = bn | |
554 | + | let bs = size(br) | |
555 | + | let bt = unit | |
556 | + | func bu (bv,bw) = if ((bw >= bs)) | |
557 | + | then bv | |
558 | + | else de(bv, br[bw]) | |
552 | 559 | ||
553 | - | func | |
554 | - | then | |
560 | + | func bx (bv,bw) = if ((bw >= bs)) | |
561 | + | then bv | |
555 | 562 | else throw("List size exceeds 20") | |
556 | 563 | ||
557 | - | | |
564 | + | bx(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bt, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
558 | 565 | } | |
559 | - | let | |
560 | - | $Tuple2([DeleteEntry( | |
566 | + | let dg = (K(ar(), 0) + 1) | |
567 | + | $Tuple2([DeleteEntry(aA()), IntegerEntry(ar(), dg), StringEntry(as(at), cq(cB)), cr(dg, cC[s], cC[r], at)], df) | |
561 | 568 | } | |
562 | 569 | } | |
563 | 570 | ||
564 | 571 | ||
565 | 572 | ||
566 | - | @Callable( | |
567 | - | func changeImplStatus ( | |
573 | + | @Callable(aR) | |
574 | + | func changeImplStatus (at,dh) = if ((aR.caller != this)) | |
568 | 575 | then throw("not authorized") | |
569 | - | else if (if (( | |
570 | - | then ( | |
576 | + | else if (if ((dh != "ACTIVE")) | |
577 | + | then (dh != "OUTDATED") | |
571 | 578 | else false) | |
572 | 579 | then throw("Unknown implementation status") | |
573 | 580 | else { | |
574 | - | let | |
575 | - | let | |
576 | - | $Tuple2([StringEntry( | |
581 | + | let cB = split(H(this, as(at)), b) | |
582 | + | let di = makeString(["%b%d%d%d%b%d%b%s", cB[z], cB[A], cB[B], cB[C], cB[D], cB[E], cB[F], dh], b) | |
583 | + | $Tuple2([StringEntry(as(at), di)], unit) | |
577 | 584 | } | |
578 | 585 | ||
579 | 586 |
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 = 250 | |
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 = 7200000 | |
27 | 27 | ||
28 | 28 | let m = 5400000 | |
29 | 29 | ||
30 | 30 | let n = 111 | |
31 | 31 | ||
32 | 32 | let o = 1 | |
33 | 33 | ||
34 | 34 | let p = 2 | |
35 | 35 | ||
36 | 36 | let q = 3 | |
37 | 37 | ||
38 | 38 | let r = 4 | |
39 | 39 | ||
40 | 40 | let s = 5 | |
41 | 41 | ||
42 | 42 | let t = 6 | |
43 | 43 | ||
44 | 44 | let u = 7 | |
45 | 45 | ||
46 | 46 | let v = 8 | |
47 | 47 | ||
48 | 48 | let w = 9 | |
49 | 49 | ||
50 | 50 | let x = 10 | |
51 | 51 | ||
52 | 52 | let y = 11 | |
53 | 53 | ||
54 | 54 | let z = 1 | |
55 | 55 | ||
56 | 56 | let A = 2 | |
57 | 57 | ||
58 | 58 | let B = 3 | |
59 | 59 | ||
60 | 60 | let C = 4 | |
61 | 61 | ||
62 | 62 | let D = 5 | |
63 | 63 | ||
64 | 64 | let E = 6 | |
65 | 65 | ||
66 | 66 | let F = 7 | |
67 | 67 | ||
68 | 68 | let G = 8 | |
69 | 69 | ||
70 | 70 | func H (I,J) = valueOrErrorMessage(getString(I, J), makeString(["mandatory ", toString(I), ".", J, " is not defined"], "")) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func K (J,L) = valueOrElse(getInteger(this, J), L) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | let M = 1 | |
77 | 77 | ||
78 | 78 | let N = 2 | |
79 | 79 | ||
80 | 80 | let O = 3 | |
81 | 81 | ||
82 | 82 | let P = 4 | |
83 | 83 | ||
84 | 84 | let Q = 5 | |
85 | 85 | ||
86 | 86 | let R = 6 | |
87 | 87 | ||
88 | 88 | let S = 7 | |
89 | 89 | ||
90 | 90 | let T = 8 | |
91 | 91 | ||
92 | 92 | let U = 9 | |
93 | 93 | ||
94 | 94 | let V = 10 | |
95 | 95 | ||
96 | 96 | let W = 11 | |
97 | 97 | ||
98 | 98 | let X = 12 | |
99 | 99 | ||
100 | 100 | let Y = 13 | |
101 | 101 | ||
102 | 102 | func Z () = "%s%s__config__controlAddress" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func aa () = "%s__controlConfig" | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func ab (ac) = split_4C(H(ac, aa()), b) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func ad (ae,af) = valueOrErrorMessage(addressFromString(ae[af]), ("Control cfg doesn't contain address at index " + toString(af))) | |
112 | 112 | ||
113 | 113 | ||
114 | - | let ag = addressFromStringValue(valueOrElse(getString(this, Z()), " | |
114 | + | let ag = addressFromStringValue(valueOrElse(getString(this, Z()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
115 | 115 | ||
116 | 116 | let ae = ab(ag) | |
117 | 117 | ||
118 | 118 | let ah = ad(ae, M) | |
119 | 119 | ||
120 | 120 | let ai = ad(ae, W) | |
121 | 121 | ||
122 | 122 | let aj = ad(ae, V) | |
123 | 123 | ||
124 | - | func ak ( | |
124 | + | func ak () = "%s__lastBase58Proposal" | |
125 | 125 | ||
126 | 126 | ||
127 | - | func | |
127 | + | func al (am) = ("%s%s__quorumRequired__" + am) | |
128 | 128 | ||
129 | 129 | ||
130 | - | func an () = "%s__ | |
130 | + | func an () = "%s__paymentRequired" | |
131 | 131 | ||
132 | 132 | ||
133 | - | func ao () = "%s__ | |
133 | + | func ao () = "%s__gNsbtRequired" | |
134 | 134 | ||
135 | 135 | ||
136 | - | func ap () = "%s__ | |
136 | + | func ap () = "%s__proposalId" | |
137 | 137 | ||
138 | 138 | ||
139 | - | func aq () = "%s__ | |
139 | + | func aq () = "%s__firstProposalId" | |
140 | 140 | ||
141 | 141 | ||
142 | - | func ar ( | |
142 | + | func ar () = "%s__updateVersion" | |
143 | 143 | ||
144 | 144 | ||
145 | - | func | |
145 | + | func as (at) = ("%s%d__proposalStatusData__" + toString(at)) | |
146 | 146 | ||
147 | 147 | ||
148 | - | func au ( | |
148 | + | func au (at) = ("%s%d__proposalData__" + toString(at)) | |
149 | 149 | ||
150 | 150 | ||
151 | - | func | |
151 | + | func av (at,aw) = makeString(["%s%d%d", "votesByOpt", toString(at), toString(aw)], b) | |
152 | 152 | ||
153 | 153 | ||
154 | - | func | |
154 | + | func ax (at,ay) = makeString(["%s%d%s", "votesByUser", toString(at), ay], b) | |
155 | 155 | ||
156 | 156 | ||
157 | - | func az () = "%s | |
157 | + | func az (at,ay) = makeString(["%s%d%s", "optionByUser", toString(at), ay], b) | |
158 | 158 | ||
159 | 159 | ||
160 | - | func aA ( | |
160 | + | func aA () = "%s__applyInProgress" | |
161 | 161 | ||
162 | 162 | ||
163 | - | func | |
163 | + | func aB (aC) = ("%s%d__proposalIdByTopicId__" + toString(aC)) | |
164 | 164 | ||
165 | 165 | ||
166 | - | func aD ( | |
166 | + | func aD (ay) = ("%s%s_userGnsbtReleaseTime__" + ay) | |
167 | 167 | ||
168 | 168 | ||
169 | - | func aE () = "%s% | |
169 | + | func aE (at) = ("%s%d__numVoters__" + toString(at)) | |
170 | 170 | ||
171 | 171 | ||
172 | - | func aF () = "%s%s%s__stats__avg__ | |
172 | + | func aF () = "%s%s%s__stats__avg__uniqueVoters" | |
173 | 173 | ||
174 | 174 | ||
175 | - | func aG () = "%s%s__stats__ | |
175 | + | func aG () = "%s%s%s__stats__avg__gnsbtVoted" | |
176 | 176 | ||
177 | 177 | ||
178 | - | func aH ( | |
178 | + | func aH () = "%s%s__stats__uniqueAuthors" | |
179 | 179 | ||
180 | 180 | ||
181 | - | func | |
181 | + | func aI (aJ) = ("%s%s__numProposalsByAuthor__" + aJ) | |
182 | 182 | ||
183 | 183 | ||
184 | - | func aL (aM) = { | |
185 | - | let aN = aM | |
186 | - | if ($isInstanceOf(aN, "List[Any]")) | |
184 | + | func aK (aL) = ("%s%d__applyHistory__" + toString(aL)) | |
185 | + | ||
186 | + | ||
187 | + | func aM (aN) = { | |
188 | + | let aO = aN | |
189 | + | if ($isInstanceOf(aO, "List[Any]")) | |
187 | 190 | then { | |
188 | - | let | |
189 | - | | |
191 | + | let aP = aO | |
192 | + | aP | |
190 | 193 | } | |
191 | 194 | else throw("fail to cast into List[Any]") | |
192 | 195 | } | |
193 | 196 | ||
194 | 197 | ||
195 | - | func | |
196 | - | let | |
197 | - | if ($isInstanceOf( | |
198 | + | func aQ (aN) = { | |
199 | + | let aO = aN | |
200 | + | if ($isInstanceOf(aO, "Int")) | |
198 | 201 | then { | |
199 | - | let | |
200 | - | | |
202 | + | let aR = aO | |
203 | + | aR | |
201 | 204 | } | |
202 | 205 | else throw("fail to cast into Int") | |
203 | 206 | } | |
204 | 207 | ||
205 | 208 | ||
206 | - | func | |
209 | + | func aS (aT,aU,aV,aW,aX,aY,aZ,ba) = makeString(["%b%d%d%d%b%d%b%s", toString(aT), toString(aU), toString(aV), toString(aW), toString(aX), toString(aY), toString(aZ), ba], b) | |
207 | 210 | ||
208 | 211 | ||
209 | - | func | |
212 | + | func bb (bc,am,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%s%s%s%s%s%d%d%d%s%d%s", bc, am, bd, be, bf, toString(bg), toString(bh), toString(bi), bj, toString(bk), bl], b) | |
210 | 213 | ||
211 | 214 | ||
212 | - | func | |
213 | - | then throw(("Too many transactions: " + toString(size( | |
215 | + | func bm (bn) = if ((size(bn) > 20)) | |
216 | + | then throw(("Too many transactions: " + toString(size(bn)))) | |
214 | 217 | else { | |
215 | - | func | |
216 | - | then throw(("Wrong txId: " + | |
217 | - | else if (( | |
218 | - | then | |
219 | - | else (( | |
218 | + | func bo (bp,bq) = if ((size(fromBase58String(bq)) != 32)) | |
219 | + | then throw(("Wrong txId: " + bq)) | |
220 | + | else if ((bp == "")) | |
221 | + | then bq | |
222 | + | else ((bp + c) + bq) | |
220 | 223 | ||
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | func | |
225 | - | then | |
226 | - | else | |
224 | + | let br = bn | |
225 | + | let bs = size(br) | |
226 | + | let bt = "" | |
227 | + | func bu (bv,bw) = if ((bw >= bs)) | |
228 | + | then bv | |
229 | + | else bo(bv, br[bw]) | |
227 | 230 | ||
228 | - | func | |
229 | - | then | |
231 | + | func bx (bv,bw) = if ((bw >= bs)) | |
232 | + | then bv | |
230 | 233 | else throw("List size exceeds 20") | |
231 | 234 | ||
232 | - | | |
235 | + | bx(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bt, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
233 | 236 | } | |
234 | 237 | ||
235 | 238 | ||
236 | - | let | |
239 | + | let by = 0 | |
237 | 240 | ||
238 | - | let | |
241 | + | let bz = 1 | |
239 | 242 | ||
240 | - | func | |
241 | - | let | |
242 | - | then invoke(aj, "updateVotingPower", [ | |
243 | + | func bA (bB) = { | |
244 | + | let bC = if (isDefined(addressFromString(bB))) | |
245 | + | then invoke(aj, "updateVotingPower", [bB], nil) | |
243 | 246 | else unit | |
244 | - | if (( | |
247 | + | if ((bC == bC)) | |
245 | 248 | then { | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | [(bF + bH) | |
249 | + | let bD = aM(invoke(ai, "gnsbtInfoSYSREADONLY", [bB, 0, 0], nil)) | |
250 | + | let bE = aM(bD[2]) | |
251 | + | let bF = aQ(bE[2]) | |
252 | + | let bG = aQ(bE[3]) | |
253 | + | let bH = aQ(bD[9]) | |
254 | + | let bI = aQ(bD[6]) | |
255 | + | [(bG + bI), (bF + bH)] | |
253 | 256 | } | |
254 | 257 | else throw("Strict value is not equal to itself.") | |
255 | 258 | } | |
256 | 259 | ||
257 | 260 | ||
258 | - | func | |
261 | + | func bJ (bK) = if ((value(indexOf(bK, e)) != 0)) | |
259 | 262 | then throw("Invalid url") | |
260 | - | else if ((size( | |
263 | + | else if ((size(bK) > g)) | |
261 | 264 | then throw("Url too long!") | |
262 | 265 | else { | |
263 | - | let | |
264 | - | let | |
265 | - | if (isDefined( | |
266 | - | then throw(("Voting with such forum link is already registered by id=" + toString(value( | |
267 | - | else | |
266 | + | let aC = valueOrErrorMessage(parseInt(drop(bK, (value(lastIndexOf(bK, "/")) + 1))), "Wrong topicId") | |
267 | + | let bL = getInteger(aB(aC)) | |
268 | + | if (isDefined(bL)) | |
269 | + | then throw(("Voting with such forum link is already registered by id=" + toString(value(bL)))) | |
270 | + | else aC | |
268 | 271 | } | |
269 | 272 | ||
270 | 273 | ||
271 | - | func | |
274 | + | func bM (bN,bc,am,bd,be,bf,bh,bi,bO,bn,bP) = if ((bN.assetId != unit)) | |
272 | 275 | then throw("Allowed WAVES payment only!") | |
273 | 276 | else { | |
274 | - | let | |
275 | - | if (( | |
276 | - | then throw(("Payment attached should be at least " + toString( | |
277 | + | let bQ = K(an(), j) | |
278 | + | if ((bQ > bN.amount)) | |
279 | + | then throw(("Payment attached should be at least " + toString(bQ))) | |
277 | 280 | else { | |
278 | - | let | |
279 | - | if (( | |
281 | + | let aC = bJ(be) | |
282 | + | if ((bf == "")) | |
280 | 283 | then throw("Title is empty") | |
281 | - | else if ((size( | |
284 | + | else if ((size(bf) > f)) | |
282 | 285 | then throw("Too long title") | |
283 | 286 | else { | |
284 | - | let | |
285 | - | if (( | |
286 | - | then throw(((("votingStartTime=" + toString( | |
287 | - | else if (( | |
288 | - | then throw(((("votingEndTime=" + toString( | |
289 | - | else if ((( | |
290 | - | then throw(((("Voting period exceeds max: " + toString(( | |
287 | + | let bg = lastBlock.timestamp | |
288 | + | if ((bg > bh)) | |
289 | + | then throw(((("votingStartTime=" + toString(bh)) + " < proposalTime=") + toString(bg))) | |
290 | + | else if ((bh > bi)) | |
291 | + | then throw(((("votingEndTime=" + toString(bi)) + " < votingStartTime=") + toString(bh))) | |
292 | + | else if (((bi - bh) > h)) | |
293 | + | then throw(((("Voting period exceeds max: " + toString((bi - bh))) + " > ") + toString(h))) | |
291 | 294 | else { | |
292 | - | let | |
295 | + | let bj = if ((am == "IDEA")) | |
293 | 296 | then "" | |
294 | - | else | |
295 | - | if ((1 >= size( | |
297 | + | else bm(bn) | |
298 | + | if ((1 >= size(bP))) | |
296 | 299 | then throw("Too few choices to vote") | |
297 | 300 | else { | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | if (( | |
303 | - | then throw((("You need at least " + toString( | |
301 | + | let bR = bA(bd) | |
302 | + | let bS = bR[by] | |
303 | + | let bT = bR[bz] | |
304 | + | let bU = K(ao(), k) | |
305 | + | if ((bU > bT)) | |
306 | + | then throw((("You need at least " + toString(bU)) + " gNsbt to create voting")) | |
304 | 307 | else { | |
305 | - | let | |
306 | - | if (( | |
308 | + | let bV = invoke(ah, "acceptWaves", nil, [bN]) | |
309 | + | if ((bV == bV)) | |
307 | 310 | then { | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
311 | + | let bW = K(al(am), d) | |
312 | + | let bk = fraction(bW, bS, i) | |
313 | + | let at = (K(ap(), 0) + 1) | |
314 | + | let bX = (K(aI(bd), 0) + 1) | |
315 | + | let bY = (K(aH(), 0) + (if ((bX == 1)) | |
313 | 316 | then 1 | |
314 | 317 | else 0)) | |
315 | - | let bY = makeString(bO, c) | |
316 | - | $Tuple2([IntegerEntry(ao(), as), IntegerEntry(aA(aB), as), StringEntry(ar(as), aR(false, 0, 0, 0, false, bh, false, "ACTIVE")), StringEntry(at(as), ba(bb, al, bc, toBase58String(toBytes(bd)), toBase58String(toBytes(be)), bf, bg, bh, bi, bj, bY)), IntegerEntry(aH(bc), bW), IntegerEntry(aG(), bX)], bb) | |
318 | + | let bZ = makeString(bP, c) | |
319 | + | let ca = getInteger(ak()) | |
320 | + | let cb = if ((ca != unit)) | |
321 | + | then nil | |
322 | + | else [IntegerEntry(ak(), (at - 1))] | |
323 | + | $Tuple2(([IntegerEntry(ap(), at), IntegerEntry(aB(aC), at), StringEntry(as(at), aS(false, 0, 0, 0, false, bi, false, "ACTIVE")), StringEntry(au(at), bb(bc, am, bd, toBase16String(toBytes(be)), toBase16String(toBytes(bf)), bg, bh, bi, bj, bk, bZ)), IntegerEntry(aI(bd), bX), IntegerEntry(aH(), bY)] ++ cb), bc) | |
317 | 324 | } | |
318 | 325 | else throw("Strict value is not equal to itself.") | |
319 | 326 | } | |
320 | 327 | } | |
321 | 328 | } | |
322 | 329 | } | |
323 | 330 | } | |
324 | 331 | } | |
325 | 332 | ||
326 | 333 | ||
327 | - | func | |
328 | - | func | |
329 | - | let af = value(indexOf( | |
330 | - | let | |
331 | - | then if ((af == | |
332 | - | then | |
333 | - | else K( | |
334 | - | else if ((af == value( | |
335 | - | then | |
336 | - | else if ((af == | |
337 | - | then | |
338 | - | else K( | |
339 | - | if (( | |
340 | - | then | |
341 | - | else $Tuple2(af, | |
334 | + | func cc (at,bP,cd,ce,cf,cg,ch) = { | |
335 | + | func ci (bp,cj) = { | |
336 | + | let af = value(indexOf(bP, cj)) | |
337 | + | let ck = if (cd) | |
338 | + | then if ((af == cg)) | |
339 | + | then ch | |
340 | + | else K(av(at, af), 0) | |
341 | + | else if ((af == value(ce))) | |
342 | + | then cf | |
343 | + | else if ((af == cg)) | |
344 | + | then ch | |
345 | + | else K(av(at, af), 0) | |
346 | + | if ((bp._2 > ck)) | |
347 | + | then bp | |
348 | + | else $Tuple2(af, ck) | |
342 | 349 | } | |
343 | 350 | ||
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | func | |
348 | - | then | |
349 | - | else | |
351 | + | let br = bP | |
352 | + | let bs = size(br) | |
353 | + | let bt = $Tuple2(0, 0) | |
354 | + | func bu (bv,bw) = if ((bw >= bs)) | |
355 | + | then bv | |
356 | + | else ci(bv, br[bw]) | |
350 | 357 | ||
351 | - | func | |
352 | - | then | |
358 | + | func bx (bv,bw) = if ((bw >= bs)) | |
359 | + | then bv | |
353 | 360 | else throw("List size exceeds 10") | |
354 | 361 | ||
355 | - | | |
362 | + | bx(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bt, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
356 | 363 | } | |
357 | 364 | ||
358 | 365 | ||
359 | - | func | |
366 | + | func cl (cm,cn,co,cp) = makeString(["%b%d%d%d%b%d%b%s", toString(cn), toString(co._1), toString(co._2), toString(cp), cm[D], cm[E], cm[F], cm[G]], b) | |
360 | 367 | ||
361 | 368 | ||
362 | - | func | |
369 | + | func cq (cm) = makeString(["%b%d%d%d%b%d%b%s", cm[z], cm[A], cm[B], cm[C], "true", cm[E], cm[F], cm[G]], b) | |
363 | 370 | ||
364 | 371 | ||
365 | - | func | |
366 | - | let | |
367 | - | let | |
368 | - | StringEntry( | |
372 | + | func cr (cs,bf,bK,at) = { | |
373 | + | let bS = bA("")[by] | |
374 | + | let ct = 500000 | |
375 | + | StringEntry(aK(lastBlock.timestamp), makeString(["%d%d%d%s%s%d", toString(cs), toString(bS), toString(ct), bf, bK, toString(at)], b)) | |
369 | 376 | } | |
370 | 377 | ||
371 | 378 | ||
372 | - | @Callable( | |
373 | - | func constructorV1 ( | |
379 | + | @Callable(aR) | |
380 | + | func constructorV1 (cu,cv,cw,cx,cy) = if ((aR.caller != this)) | |
374 | 381 | then throw("Permission denied") | |
375 | - | else [StringEntry(Z(), | |
382 | + | else [StringEntry(Z(), cu), IntegerEntry(ao(), cv), IntegerEntry(an(), cw), IntegerEntry(al("IDEA"), cx), IntegerEntry(al("UPDATE"), cy)] | |
376 | 383 | ||
377 | 384 | ||
378 | 385 | ||
379 | - | @Callable( | |
380 | - | func castVote ( | |
381 | - | let | |
382 | - | let | |
383 | - | if (( | |
386 | + | @Callable(aR) | |
387 | + | func castVote (at,cz) = { | |
388 | + | let cA = toString(aR.caller) | |
389 | + | let cB = split(H(this, as(at)), b) | |
390 | + | if ((cB[F] == "true")) | |
384 | 391 | then throw("Voting is canceled by team") | |
385 | 392 | else { | |
386 | - | let | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | if (( | |
393 | + | let cC = split(H(this, au(at)), b) | |
394 | + | let cD = parseIntValue(cC[u]) | |
395 | + | let cE = parseIntValue(cC[v]) | |
396 | + | let cF = lastBlock.timestamp | |
397 | + | if ((cD > cF)) | |
391 | 398 | then throw("Voting not started yet") | |
392 | - | else if (( | |
399 | + | else if ((cF >= cE)) | |
393 | 400 | then throw("Voting already finished") | |
394 | 401 | else { | |
395 | - | let | |
396 | - | let | |
397 | - | if ((1 >= | |
402 | + | let cG = split(cC[y], c) | |
403 | + | let cH = size(cG) | |
404 | + | if ((1 >= cH)) | |
398 | 405 | then throw("Too few choices to vote") | |
399 | - | else if (( | |
400 | - | then throw(("Unknown choice! Must be 0.." + toString(( | |
406 | + | else if ((cz >= cH)) | |
407 | + | then throw(("Unknown choice! Must be 0.." + toString((cH - 1)))) | |
401 | 408 | else { | |
402 | - | let | |
403 | - | let | |
404 | - | if ((0 >= | |
409 | + | let bR = bA(cA) | |
410 | + | let cI = bR[bz] | |
411 | + | if ((0 >= cI)) | |
405 | 412 | then throw("no gnsbt to vote") | |
406 | 413 | else { | |
407 | - | let | |
408 | - | let | |
409 | - | let | |
414 | + | let bS = bR[by] | |
415 | + | let ce = getInteger(az(at, cA)) | |
416 | + | let cJ = if (!(isDefined(ce))) | |
410 | 417 | then 0 | |
411 | - | else K( | |
412 | - | let | |
413 | - | then K( | |
418 | + | else K(ax(at, cA), 0) | |
419 | + | let cK = if (isDefined(ce)) | |
420 | + | then K(av(at, value(ce)), 0) | |
414 | 421 | else 0 | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
422 | + | let cL = K(av(at, cz), 0) | |
423 | + | let cM = parseIntValue(cB[C]) | |
424 | + | let cN = if (!(isDefined(ce))) | |
418 | 425 | then 0 | |
419 | - | else (( | |
420 | - | then | |
426 | + | else ((cK - cJ) + (if ((value(ce) == cz)) | |
427 | + | then cI | |
421 | 428 | else 0)) | |
422 | - | let | |
423 | - | then (value( | |
429 | + | let ch = if (if (isDefined(ce)) | |
430 | + | then (value(ce) == cz) | |
424 | 431 | else false) | |
425 | - | then | |
426 | - | else ( | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | let | |
432 | + | then cN | |
433 | + | else (cL + cI) | |
434 | + | let cO = ((cM - cJ) + cI) | |
435 | + | let cP = (cO >= parseIntValue(cC[x])) | |
436 | + | let cQ = K(aE(at), 0) | |
437 | + | let cR = K(aF(), 0) | |
438 | + | let cS = ((getIntegerValue(ap()) - valueOrElse(getInteger(aq()), n)) + 1) | |
439 | + | let cT = if ((cJ == 0)) | |
433 | 440 | then 1 | |
434 | 441 | else 0 | |
435 | - | let | |
436 | - | let | |
437 | - | let | |
438 | - | let | |
442 | + | let cU = (cR + fraction(cT, i, cS)) | |
443 | + | let cV = K(aG(), 0) | |
444 | + | let cW = (cV + ((cI - cJ) / cS)) | |
445 | + | let cd = if (!(isDefined(ce))) | |
439 | 446 | then true | |
440 | - | else (value( | |
441 | - | let | |
447 | + | else (value(ce) == cz) | |
448 | + | let cf = if (cd) | |
442 | 449 | then nil | |
443 | - | else [IntegerEntry( | |
444 | - | let | |
445 | - | let | |
446 | - | $Tuple2(([IntegerEntry( | |
450 | + | else [IntegerEntry(av(at, value(ce)), cN)] | |
451 | + | let cX = cc(at, cG, cd, ce, cN, cz, ch) | |
452 | + | let cY = max([cE, K(aD(cA), 0)]) | |
453 | + | $Tuple2(([IntegerEntry(az(at, cA), cz), IntegerEntry(ax(at, cA), cI), IntegerEntry(av(at, cz), ch), IntegerEntry(aE(at), (cQ + cT)), IntegerEntry(aD(cA), cY), IntegerEntry(aF(), cU), IntegerEntry(aG(), cW), StringEntry(as(at), cl(cB, cP, cX, cO))] ++ cf), unit) | |
447 | 454 | } | |
448 | 455 | } | |
449 | 456 | } | |
450 | 457 | } | |
451 | 458 | } | |
452 | 459 | ||
453 | 460 | ||
454 | 461 | ||
455 | - | @Callable( | |
456 | - | func initiateIdeaVoting ( | |
462 | + | @Callable(aR) | |
463 | + | func initiateIdeaVoting (be,bf,bh,bi,bP) = if ((size(aR.payments) != 1)) | |
457 | 464 | then throw("Exactly one payment required") | |
458 | - | else if ((size( | |
465 | + | else if ((size(bP) != 2)) | |
459 | 466 | then throw("Exactly 2 option ['NO', 'YES'] are expected") | |
460 | - | else if (( | |
467 | + | else if ((bP[0] != "NO")) | |
461 | 468 | then throw("Option NO should be the first") | |
462 | - | else if (( | |
469 | + | else if ((bP[1] != "YES")) | |
463 | 470 | then throw("Option YES should be the second") | |
464 | - | else | |
471 | + | else bM(value(aR.payments[0]), toBase58String(aR.transactionId), "IDEA", toString(aR.caller), be, bf, bh, bi, "PENDING", nil, bP) | |
465 | 472 | ||
466 | 473 | ||
467 | 474 | ||
468 | - | @Callable( | |
469 | - | func initiateUpdateVoting ( | |
475 | + | @Callable(aR) | |
476 | + | func initiateUpdateVoting (be,bf,bh,bi,bn) = if ((size(aR.payments) != 1)) | |
470 | 477 | then throw("Exactly one payment required") | |
471 | - | else if ((1 > size( | |
478 | + | else if ((1 > size(bn))) | |
472 | 479 | then throw("Transactions list is empty") | |
473 | - | else if (( | |
480 | + | else if ((aR.caller != this)) | |
474 | 481 | then throw("not authorized") | |
475 | - | else | |
482 | + | else bM(value(aR.payments[0]), toBase58String(aR.transactionId), "UPDATE", toString(aR.caller), be, bf, bh, bi, "PENDING", bn, ["NO", "YES"]) | |
476 | 483 | ||
477 | 484 | ||
478 | 485 | ||
479 | - | @Callable( | |
480 | - | func cancelVoting ( | |
486 | + | @Callable(aR) | |
487 | + | func cancelVoting (at) = if ((aR.caller != this)) | |
481 | 488 | then throw("not authorized") | |
482 | 489 | else { | |
483 | - | let | |
484 | - | let | |
485 | - | $Tuple2([StringEntry( | |
490 | + | let cZ = H(this, as(at)) | |
491 | + | let da = ((take(cZ, value(lastIndexOf(cZ, b))) + b) + "true") | |
492 | + | $Tuple2([StringEntry(as(at), da)], unit) | |
486 | 493 | } | |
487 | 494 | ||
488 | 495 | ||
489 | 496 | ||
490 | - | @Callable( | |
491 | - | func applyUpdate ( | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | if (( | |
497 | + | @Callable(aR) | |
498 | + | func applyUpdate (at) = { | |
499 | + | let cC = split(H(this, au(at)), b) | |
500 | + | let cE = parseIntValue(cC[v]) | |
501 | + | let cF = lastBlock.timestamp | |
502 | + | if ((cE > cF)) | |
496 | 503 | then throw("Voting is not finished yet") | |
497 | - | else if (("UPDATE" != | |
504 | + | else if (("UPDATE" != cC[p])) | |
498 | 505 | then throw("Only UPDATE type can be applied") | |
499 | 506 | else { | |
500 | - | let | |
501 | - | if (( | |
507 | + | let cB = split(H(this, as(at)), b) | |
508 | + | if ((cB[F] == "true")) | |
502 | 509 | then throw("Voting is canceled") | |
503 | - | else if (( | |
510 | + | else if ((cB[z] != "true")) | |
504 | 511 | then throw("Voting status invalid") | |
505 | - | else if (( | |
512 | + | else if ((cB[A] != "1")) | |
506 | 513 | then throw("Winner is 'NO' - nothing to apply") | |
507 | - | else if (( | |
514 | + | else if ((cB[D] == "true")) | |
508 | 515 | then throw("Scripts are already applied") | |
509 | 516 | else { | |
510 | - | let | |
511 | - | if ((( | |
512 | - | then throw((("Scripts timestamp=" + toString( | |
513 | - | else if (( | |
514 | - | then throw((("Scripts timestamp=" + toString( | |
517 | + | let db = parseIntValue(cB[E]) | |
518 | + | if (((cF - l) > db)) | |
519 | + | then throw((("Scripts timestamp=" + toString(db)) + " is too far in the past, max 2 hrs allowed")) | |
520 | + | else if ((db > (cF + m))) | |
521 | + | then throw((("Scripts timestamp=" + toString(db)) + " is too far in the future, max 1.5 hrs allowed")) | |
515 | 522 | else { | |
516 | - | let | |
517 | - | if (( | |
518 | - | then throw((("proposalId=" + toString( | |
523 | + | let dc = K(aA(), -1) | |
524 | + | if ((dc != -1)) | |
525 | + | then throw((("proposalId=" + toString(dc)) + " is already being applied. Finish it first!")) | |
519 | 526 | else { | |
520 | - | let | |
521 | - | if (( | |
522 | - | then $Tuple2([IntegerEntry( | |
527 | + | let dd = invoke(ag, "callEmergencyShutdown", ["Applying Governance UPDATE"], nil) | |
528 | + | if ((dd == dd)) | |
529 | + | then $Tuple2([IntegerEntry(aA(), at)], unit) | |
523 | 530 | else throw("Strict value is not equal to itself.") | |
524 | 531 | } | |
525 | 532 | } | |
526 | 533 | } | |
527 | 534 | } | |
528 | 535 | } | |
529 | 536 | ||
530 | 537 | ||
531 | 538 | ||
532 | - | @Callable( | |
539 | + | @Callable(aR) | |
533 | 540 | func finishApply () = { | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | if (( | |
541 | + | let at = valueOrErrorMessage(getInteger(aA()), "No apply in progress, nothing to finish") | |
542 | + | let cC = split(H(this, au(at)), b) | |
543 | + | let bn = split(cC[w], c) | |
544 | + | let cB = split(H(this, as(at)), b) | |
545 | + | if ((cB[D] == "true")) | |
539 | 546 | then throw("Scripts are already applied") | |
540 | 547 | else { | |
541 | - | func | |
542 | - | then throw(("NOT applied txId: " + | |
548 | + | func de (bp,bq) = if (!(isDefined(transactionHeightById(fromBase58String(bq))))) | |
549 | + | then throw(("NOT applied txId: " + bq)) | |
543 | 550 | else unit | |
544 | 551 | ||
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | func | |
550 | - | then | |
551 | - | else | |
552 | + | let df = { | |
553 | + | let br = bn | |
554 | + | let bs = size(br) | |
555 | + | let bt = unit | |
556 | + | func bu (bv,bw) = if ((bw >= bs)) | |
557 | + | then bv | |
558 | + | else de(bv, br[bw]) | |
552 | 559 | ||
553 | - | func | |
554 | - | then | |
560 | + | func bx (bv,bw) = if ((bw >= bs)) | |
561 | + | then bv | |
555 | 562 | else throw("List size exceeds 20") | |
556 | 563 | ||
557 | - | | |
564 | + | bx(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bu(bt, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
558 | 565 | } | |
559 | - | let | |
560 | - | $Tuple2([DeleteEntry( | |
566 | + | let dg = (K(ar(), 0) + 1) | |
567 | + | $Tuple2([DeleteEntry(aA()), IntegerEntry(ar(), dg), StringEntry(as(at), cq(cB)), cr(dg, cC[s], cC[r], at)], df) | |
561 | 568 | } | |
562 | 569 | } | |
563 | 570 | ||
564 | 571 | ||
565 | 572 | ||
566 | - | @Callable( | |
567 | - | func changeImplStatus ( | |
573 | + | @Callable(aR) | |
574 | + | func changeImplStatus (at,dh) = if ((aR.caller != this)) | |
568 | 575 | then throw("not authorized") | |
569 | - | else if (if (( | |
570 | - | then ( | |
576 | + | else if (if ((dh != "ACTIVE")) | |
577 | + | then (dh != "OUTDATED") | |
571 | 578 | else false) | |
572 | 579 | then throw("Unknown implementation status") | |
573 | 580 | else { | |
574 | - | let | |
575 | - | let | |
576 | - | $Tuple2([StringEntry( | |
581 | + | let cB = split(H(this, as(at)), b) | |
582 | + | let di = makeString(["%b%d%d%d%b%d%b%s", cB[z], cB[A], cB[B], cB[C], cB[D], cB[E], cB[F], dh], b) | |
583 | + | $Tuple2([StringEntry(as(at), di)], unit) | |
577 | 584 | } | |
578 | 585 | ||
579 | 586 |
github/deemru/w8io/026f985 250.02 ms ◑