tx · 56SzMf9LWuB4o1CUSWaK3fpgpESzmVdRYBBiscuqq2yE 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp: -0.02200000 Waves 2023.05.02 09:51 [2559807] smart account 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp > SELF 0.00000000 Waves
{ "type": 13, "id": "56SzMf9LWuB4o1CUSWaK3fpgpESzmVdRYBBiscuqq2yE", "fee": 2200000, "feeAssetId": null, "timestamp": 1683010336908, "version": 2, "chainId": 84, "sender": "3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp", "senderPublicKey": "bS6Cchmk25EdDcapkz8W5WkZgthTHHW6sSBbcidSrCb", "proofs": [ "RopuhtCcWAwAQbM2uufzDvPSmxF1RtJ3PEonuNPiaj7pSgowyXmqfpGY1x96PBk8pxPNsU7BXGBw3SGowZsy2Xu" ], "script": "base64:BgK1IggCEgkKBwEBAQEBCAESABIECgIICBIDCgEIEgQKAggIEgQKAggIIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIghhc1N0cmluZyIDdmFsIgckbWF0Y2gwIgZ2YWxTdHIiHWNvbnZlcnRQcmljZUFzc2V0SW50b0lkb0Fzc2V0IhBwcmljZUFzc2V0QW1vdW50Ig5wcmljZUFzc2V0TVVMVCIFcHJpY2UiCXByaWNlTVVMVCIMaWRvQXNzZXRNVUxUIg9iUHJpY2VBc3NldE1VTFQiDWJJZG9Bc3NldE1VTFQiDmJQcmljZUFzc2V0QlVGIg9iQW1vdW50QXNzZXRCVUYiDklkeENmZ0lkb1N0YXJ0IhFJZHhDZmdJZG9EdXJhdGlvbiIQSWR4Q2ZnQ2xhaW1TdGFydCITSWR4Q2ZnQ2xhaW1EdXJhdGlvbiILSWR4Q2ZnUHJpY2UiD0lkeENmZ1ByaWNlTXVsdCIQSWR4Q2ZnSWRvQXNzZXRJZCISSWR4Q2ZnSWRvQXNzZXRNdWx0I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BQFqAgRVbml0CAUCZHcPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmR3CWJvZHlCeXRlcwkAkQMCCAUCZHcGcHJvb2ZzAAAFAmR5VOajIA==", "height": 2559807, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HNAZjp4N6gzhHXAGGALQMBHMmVB7DdPFK7Wkkc7pC3En Next: none Diff:
Old | New | Differences | |
---|---|---|---|
143 | 143 | func aH () = "%s__managerPublicKey" | |
144 | 144 | ||
145 | 145 | ||
146 | - | func aI () = "%s__ | |
146 | + | func aI () = "%s__managerVaultAddress" | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func aJ () = split(a(ah()), c) | |
161 | 161 | func aO (aj) = split(a(ai(aj)), c) | |
162 | 162 | ||
163 | 163 | ||
164 | - | ||
164 | + | func aP () = addressFromStringValue(getStringValue(aI())) | |
165 | 165 | ||
166 | - | let aQ = 1 | |
167 | 166 | ||
168 | - | let | |
167 | + | let aQ = 0 | |
169 | 168 | ||
170 | - | let | |
169 | + | let aR = 1 | |
171 | 170 | ||
172 | - | func aT (b,aU,aV,aW,aX) = { | |
173 | - | let Z = parseIntValue(aU[T]) | |
174 | - | let aa = parseIntValue(aU[U]) | |
175 | - | let ab = parseIntValue(aU[V]) | |
176 | - | let ac = parseIntValue(aU[W]) | |
177 | - | let ad = parseIntValue(aU[X]) | |
178 | - | let aY = (Z + aV[aP]) | |
179 | - | let aZ = (aa + aV[aQ]) | |
180 | - | let ba = aJ() | |
181 | - | let O = ba[D] | |
182 | - | let bb = value(assetInfo(fromBase58String(O))).decimals | |
183 | - | let bc = fraction(aX, e, pow(10, 0, bb, 0, 0, DOWN)) | |
184 | - | let bd = ((ab + aV[aR]) - aX) | |
185 | - | let be = ((ac + aV[aS]) + bc) | |
186 | - | let bf = if ((0 > aZ)) | |
171 | + | let aS = 2 | |
172 | + | ||
173 | + | let aT = 3 | |
174 | + | ||
175 | + | func aU (b,aV,aW,aX,aY) = { | |
176 | + | let Z = parseIntValue(aV[T]) | |
177 | + | let aa = parseIntValue(aV[U]) | |
178 | + | let ab = parseIntValue(aV[V]) | |
179 | + | let ac = parseIntValue(aV[W]) | |
180 | + | let ad = parseIntValue(aV[X]) | |
181 | + | let aZ = (Z + aW[aQ]) | |
182 | + | let ba = (aa + aW[aR]) | |
183 | + | let bb = aJ() | |
184 | + | let O = bb[D] | |
185 | + | let bc = value(assetInfo(fromBase58String(O))).decimals | |
186 | + | let bd = fraction(aY, e, pow(10, 0, bc, 0, 0, DOWN)) | |
187 | + | let be = ((ab + aW[aS]) - aY) | |
188 | + | let bf = ((ac + aW[aT]) + bd) | |
189 | + | let bg = if ((0 > ba)) | |
187 | 190 | then { | |
188 | - | let | |
189 | - | let | |
191 | + | let bh = ((aZ - be) - bf) | |
192 | + | let bi = if ((0 > bh)) | |
190 | 193 | then 0 | |
191 | - | else | |
192 | - | StringEntry(b, ae( | |
194 | + | else bh | |
195 | + | StringEntry(b, ae(aZ, bi, be, bf, aX)) | |
193 | 196 | } | |
194 | - | else StringEntry(b, ae( | |
195 | - | | |
197 | + | else StringEntry(b, ae(aZ, ba, be, bf, aX)) | |
198 | + | bg | |
196 | 199 | } | |
197 | 200 | ||
198 | 201 | ||
199 | - | func | |
202 | + | func bj (aj,m,ag,bk) = StringEntry(al("invest", aj, toBase58String(bk)), af(m, ag)) | |
200 | 203 | ||
201 | 204 | ||
202 | - | func | |
205 | + | func bl (aj,m,ag,bk) = StringEntry(al("claim", aj, toBase58String(bk)), af(m, ag)) | |
203 | 206 | ||
204 | 207 | ||
205 | - | func | |
206 | - | let | |
207 | - | let J = parseIntValue( | |
208 | - | let K = parseIntValue( | |
209 | - | let | |
210 | - | let o = parseIntValue( | |
211 | - | let L = parseIntValue( | |
212 | - | let M = | |
213 | - | let | |
214 | - | let N = parseIntValue( | |
215 | - | let O = | |
216 | - | let | |
217 | - | let P = parseIntValue( | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
208 | + | func bm (bn,aj,bk) = { | |
209 | + | let bb = aJ() | |
210 | + | let J = parseIntValue(bb[x]) | |
211 | + | let K = parseIntValue(bb[y]) | |
212 | + | let bo = (J + K) | |
213 | + | let o = parseIntValue(bb[z]) | |
214 | + | let L = parseIntValue(bb[A]) | |
215 | + | let M = bb[B] | |
216 | + | let bp = fromBase58String(M) | |
217 | + | let N = parseIntValue(bb[C]) | |
218 | + | let O = bb[D] | |
219 | + | let bq = fromBase58String(O) | |
220 | + | let P = parseIntValue(bb[E]) | |
221 | + | let br = toString(aj) | |
222 | + | let bs = aO(br) | |
223 | + | let bt = parseIntValue(bs[T]) | |
224 | + | let bu = parseIntValue(bs[X]) | |
225 | + | let bv = if ((J >= bu)) | |
223 | 226 | then J | |
224 | - | else | |
225 | - | let | |
226 | - | then | |
227 | + | else bu | |
228 | + | let bw = if ((height > bo)) | |
229 | + | then bo | |
227 | 230 | else if ((J > height)) | |
228 | 231 | then J | |
229 | 232 | else height | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | then | |
233 | + | let bx = (bw - bv) | |
234 | + | let by = fraction(bt, bx, K) | |
235 | + | let bz = l(by, P, o, L, N) | |
236 | + | let bA = (bn == O) | |
237 | + | let bB = valueOrElse(getBoolean(ao()), false) | |
238 | + | let bC = [if (!(if (bA) | |
239 | + | then bB | |
237 | 240 | else false)) | |
238 | 241 | then true | |
239 | 242 | else throw("USDN claim is disabled")] | |
240 | - | if (( | |
241 | - | then if (( | |
242 | - | then $Tuple6([0, -( | |
243 | - | else if (( | |
244 | - | then $Tuple6([0, -( | |
245 | - | else throw(("unsupported assetId: " + | |
243 | + | if ((bC == bC)) | |
244 | + | then if ((bn == O)) | |
245 | + | then $Tuple6([0, -(by), by, 0], by, bq, bs, bw, [by, bz]) | |
246 | + | else if ((bn == M)) | |
247 | + | then $Tuple6([0, -(by), 0, bz], bz, bp, bs, bw, [by, bz]) | |
248 | + | else throw(("unsupported assetId: " + bn)) | |
246 | 249 | else throw("Strict value is not equal to itself.") | |
247 | 250 | } | |
248 | 251 | ||
249 | 252 | ||
250 | - | func | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
253 | + | func bD (O,br,bE,bF) = { | |
254 | + | let bG = value(getInteger(aw(O))) | |
255 | + | let bH = value(getInteger(ay(O))) | |
256 | + | let bI = value(getInteger(aq())) | |
257 | + | let bJ = valueOrElse(getInteger(ar()), 0) | |
258 | + | let bK = isDefined(getInteger(au(0))) | |
259 | + | let bL = if ((bJ > 0)) | |
257 | 260 | then { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | + | let bM = value(getInteger(as(bJ))) | |
262 | + | let bN = value(getInteger(au(bJ))) | |
263 | + | let bO = if ((height > bN)) | |
261 | 264 | then { | |
262 | - | let | |
263 | - | let | |
265 | + | let bP = (bJ + 1) | |
266 | + | let bQ = if ((height > (bN + bI))) | |
264 | 267 | then { | |
265 | - | let | |
266 | - | if (( | |
267 | - | then ((height - | |
268 | - | else (height - | |
268 | + | let bR = ((height - bN) % bI) | |
269 | + | if ((bR == 0)) | |
270 | + | then ((height - bI) + 1) | |
271 | + | else (height - bR) | |
269 | 272 | } | |
270 | - | else ( | |
271 | - | let | |
272 | - | $Tuple3( | |
273 | + | else (bN + 1) | |
274 | + | let bS = ((bQ + bI) - 1) | |
275 | + | $Tuple3(bP, bQ, bS) | |
273 | 276 | } | |
274 | - | else $Tuple3( | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | $Tuple3( | |
277 | + | else $Tuple3(bJ, bM, bN) | |
278 | + | let bP = bO._1 | |
279 | + | let bQ = bO._2 | |
280 | + | let bS = bO._3 | |
281 | + | $Tuple3(bP, bQ, bS) | |
279 | 282 | } | |
280 | - | else if ( | |
283 | + | else if (bK) | |
281 | 284 | then { | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
285 | + | let bT = value(getInteger(as(0))) | |
286 | + | let bU = value(getInteger(au(0))) | |
287 | + | let bV = if ((height > bU)) | |
285 | 288 | then { | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | $Tuple3( | |
289 | + | let bP = (bJ + 1) | |
290 | + | let bQ = (bU + 1) | |
291 | + | let bS = ((bQ + bI) - 1) | |
292 | + | $Tuple3(bP, bQ, bS) | |
290 | 293 | } | |
291 | - | else $Tuple3( | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | $Tuple3( | |
294 | + | else $Tuple3(bJ, bT, bU) | |
295 | + | let bP = bV._1 | |
296 | + | let bQ = bV._2 | |
297 | + | let bS = bV._3 | |
298 | + | $Tuple3(bP, bQ, bS) | |
296 | 299 | } | |
297 | - | else $Tuple3( | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | if ($isInstanceOf( | |
310 | - | then | |
311 | - | else throw(($getType( | |
300 | + | else $Tuple3(bJ, valueOrElse(getInteger(as(bJ)), height), valueOrElse(getInteger(au(bJ)), ((height + bI) - 1))) | |
301 | + | let bP = bL._1 | |
302 | + | let bQ = bL._2 | |
303 | + | let bS = bL._3 | |
304 | + | let bW = valueOrElse(getInteger(az(O, bP)), bG) | |
305 | + | let bX = valueOrElse(getInteger(aA(O, bP, br)), bH) | |
306 | + | let aY = valueOrElse(getInteger(aD(br)), 0) | |
307 | + | let bY = min([(bE + aY), bW, bX]) | |
308 | + | let bZ = value(getInteger(av())) | |
309 | + | let ca = e | |
310 | + | let cb = { | |
311 | + | let cc = invoke(addressFromStringValue(value(getString(aB()))), "putOneTknV2WithoutTakeFeeREADONLY", [ca, O], nil) | |
312 | + | if ($isInstanceOf(cc, "(Int, Int, Int)")) | |
313 | + | then cc | |
314 | + | else throw(($getType(cc) + " couldn't be cast to (Int, Int, Int)")) | |
312 | 315 | } | |
313 | - | if (( | |
316 | + | if ((cb == cb)) | |
314 | 317 | then { | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | if ($isInstanceOf( | |
322 | - | then | |
323 | - | else throw(($getType( | |
318 | + | let cd = cb._3 | |
319 | + | let ce = cb._2 | |
320 | + | let cf = cb._1 | |
321 | + | let cg = value(getString(aC())) | |
322 | + | let ch = { | |
323 | + | let cc = invoke(addressFromStringValue(value(getString(aB()))), "getOneTknV2READONLY", [cg, cf], nil) | |
324 | + | if ($isInstanceOf(cc, "(Int, Int)")) | |
325 | + | then cc | |
326 | + | else throw(($getType(cc) + " couldn't be cast to (Int, Int)")) | |
324 | 327 | } | |
325 | - | if (( | |
328 | + | if ((ch == ch)) | |
326 | 329 | then { | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | $Tuple10( | |
330 | + | let ci = ch._2 | |
331 | + | let cj = ch._1 | |
332 | + | let ck = fraction(ca, e, cj) | |
333 | + | let cl = (bS - height) | |
334 | + | $Tuple10(bY, bW, bX, bF, bZ, ck, cl, bP, bQ, bS) | |
332 | 335 | } | |
333 | 336 | else throw("Strict value is not equal to itself.") | |
334 | 337 | } | |
336 | 339 | } | |
337 | 340 | ||
338 | 341 | ||
339 | - | func cl () = { | |
340 | - | let j = getString(aH()) | |
342 | + | func cm () = { | |
343 | + | let cn = aP() | |
344 | + | let j = getString(cn, aH()) | |
341 | 345 | if ($isInstanceOf(j, "String")) | |
342 | 346 | then { | |
343 | - | let | |
344 | - | fromBase58String( | |
347 | + | let co = j | |
348 | + | fromBase58String(co) | |
345 | 349 | } | |
346 | 350 | else if ($isInstanceOf(j, "Unit")) | |
347 | 351 | then unit | |
349 | 353 | } | |
350 | 354 | ||
351 | 355 | ||
352 | - | func cn () = { | |
353 | - | let j = getString(aI()) | |
354 | - | if ($isInstanceOf(j, "String")) | |
356 | + | func cp (cq) = { | |
357 | + | let cr = throw("Permission denied") | |
358 | + | let j = cm() | |
359 | + | if ($isInstanceOf(j, "ByteVector")) | |
355 | 360 | then { | |
356 | - | let cm = j | |
357 | - | fromBase58String(cm) | |
361 | + | let cs = j | |
362 | + | if ((cq.callerPublicKey == cs)) | |
363 | + | then true | |
364 | + | else cr | |
358 | 365 | } | |
359 | 366 | else if ($isInstanceOf(j, "Unit")) | |
360 | - | then unit | |
367 | + | then if ((cq.caller == this)) | |
368 | + | then true | |
369 | + | else cr | |
361 | 370 | else throw("Match error") | |
362 | 371 | } | |
363 | 372 | ||
364 | 373 | ||
365 | - | func co (cp) = { | |
366 | - | let cq = throw("Permission denied") | |
367 | - | let j = cl() | |
368 | - | if ($isInstanceOf(j, "ByteVector")) | |
369 | - | then { | |
370 | - | let cr = j | |
371 | - | if ((cp.callerPublicKey == cr)) | |
372 | - | then true | |
373 | - | else cq | |
374 | - | } | |
375 | - | else if ($isInstanceOf(j, "Unit")) | |
376 | - | then if ((cp.caller == this)) | |
377 | - | then true | |
378 | - | else cq | |
379 | - | else throw("Match error") | |
380 | - | } | |
381 | - | ||
382 | - | ||
383 | - | @Callable(cp) | |
374 | + | @Callable(cq) | |
384 | 375 | func constructor (H,I,J,K,o,O,Q) = { | |
385 | 376 | let L = ((100 * 1000) * 1000) | |
386 | - | let | |
377 | + | let ct = (H + I) | |
387 | 378 | if (isDefined(getString(ah()))) | |
388 | 379 | then throw("already initialized") | |
389 | - | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString( | |
380 | + | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(cq.caller))) | |
390 | 381 | then throw("not authorized") | |
391 | - | else if ((size( | |
382 | + | else if ((size(cq.payments) != 1)) | |
392 | 383 | then throw("exactly 1 payment must be attached") | |
393 | - | else if (( | |
384 | + | else if ((ct >= J)) | |
394 | 385 | then throw("claimStart must be greater than idoEnd") | |
395 | 386 | else { | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let M = toBase58String( | |
400 | - | let N = pow(10, 0, | |
401 | - | let | |
402 | - | let | |
403 | - | let P = pow(10, 0, | |
404 | - | let | |
405 | - | let | |
406 | - | [StringEntry(ah(), S(H, I, J, K, o, L, M, N, O, P, Q, | |
387 | + | let cu = value(cq.payments[0]) | |
388 | + | let bp = value(cu.assetId) | |
389 | + | let cv = valueOrErrorMessage(assetInfo(bp), "fail to load ido asset info") | |
390 | + | let M = toBase58String(bp) | |
391 | + | let N = pow(10, 0, cv.decimals, 0, 0, DOWN) | |
392 | + | let bq = fromBase58String(O) | |
393 | + | let cw = valueOrErrorMessage(assetInfo(bq), "fail to load price asset info") | |
394 | + | let P = pow(10, 0, cw.decimals, 0, 0, DOWN) | |
395 | + | let cx = aM() | |
396 | + | let cy = [0, 0, 0, 0] | |
397 | + | [StringEntry(ah(), S(H, I, J, K, o, L, M, N, O, P, Q, cu.amount)), aU(ak(), cx, cy, J, 0)] | |
407 | 398 | } | |
408 | 399 | } | |
409 | 400 | ||
410 | 401 | ||
411 | 402 | ||
412 | - | @Callable( | |
403 | + | @Callable(cq) | |
413 | 404 | func invest () = { | |
414 | - | let | |
415 | - | let H = parseIntValue( | |
416 | - | let I = parseIntValue( | |
417 | - | let | |
418 | - | let J = parseIntValue( | |
419 | - | let K = parseIntValue( | |
420 | - | let o = parseIntValue( | |
421 | - | let L = parseIntValue( | |
422 | - | let M = | |
423 | - | let | |
424 | - | let N = parseIntValue( | |
425 | - | let O = | |
426 | - | let | |
427 | - | let P = parseIntValue( | |
428 | - | let | |
429 | - | let aj = toString( | |
405 | + | let bb = aJ() | |
406 | + | let H = parseIntValue(bb[v]) | |
407 | + | let I = parseIntValue(bb[w]) | |
408 | + | let ct = (H + I) | |
409 | + | let J = parseIntValue(bb[x]) | |
410 | + | let K = parseIntValue(bb[y]) | |
411 | + | let o = parseIntValue(bb[z]) | |
412 | + | let L = parseIntValue(bb[A]) | |
413 | + | let M = bb[B] | |
414 | + | let bp = fromBase58String(M) | |
415 | + | let N = parseIntValue(bb[C]) | |
416 | + | let O = bb[D] | |
417 | + | let bq = fromBase58String(O) | |
418 | + | let P = parseIntValue(bb[E]) | |
419 | + | let cz = parseIntValue(bb[F]) | |
420 | + | let aj = toString(cq.caller) | |
430 | 421 | if ((H > height)) | |
431 | 422 | then throw("ido has not been started yet") | |
432 | - | else if ((height > | |
423 | + | else if ((height > ct)) | |
433 | 424 | then throw("ido has been already ended") | |
434 | - | else if ((size( | |
425 | + | else if ((size(cq.payments) != 1)) | |
435 | 426 | then throw("exactly 1 payment is expected") | |
436 | 427 | else { | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | if (( | |
441 | - | then throw((("invalid payment asset id: " + toBase58String( | |
428 | + | let cu = value(cq.payments[0]) | |
429 | + | let cA = value(cu.assetId) | |
430 | + | let cB = cu.amount | |
431 | + | if ((cA != bq)) | |
432 | + | then throw((("invalid payment asset id: " + toBase58String(cA)) + " is expected")) | |
442 | 433 | else { | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | if (( | |
434 | + | let cC = aN(aj) | |
435 | + | let cx = aM() | |
436 | + | let cD = (parseIntValue(cx[T]) + cB) | |
437 | + | let cE = (cD * 100) | |
438 | + | if ((cE > assetBalance(this, bp))) | |
448 | 439 | then throw("IDO asset has been - sold consider to use smaller payment") | |
449 | 440 | else { | |
450 | - | let | |
451 | - | [ | |
441 | + | let cy = [cB, cB, 0, 0] | |
442 | + | [aU(ai(aj), cC, cy, J, 0), aU(ak(), cx, cy, J, 0), bj(aj, cB, 0, cq.transactionId)] | |
452 | 443 | } | |
453 | 444 | } | |
454 | 445 | } | |
456 | 447 | ||
457 | 448 | ||
458 | 449 | ||
459 | - | @Callable( | |
460 | - | func claim ( | |
461 | - | let | |
462 | - | if (( | |
450 | + | @Callable(cq) | |
451 | + | func claim (bn,br) = { | |
452 | + | let cF = toString(cq.caller) | |
453 | + | if ((br != cF)) | |
463 | 454 | then throw("not authorized") | |
464 | 455 | else { | |
465 | - | let | |
466 | - | let O = | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
456 | + | let bb = aJ() | |
457 | + | let O = bb[D] | |
458 | + | let cG = bm(bn, cq.caller, cq.transactionId) | |
459 | + | let cy = cG._1 | |
460 | + | let bE = cG._2 | |
461 | + | let cH = cG._3 | |
462 | + | let bs = cG._4 | |
463 | + | let bw = cG._5 | |
464 | + | let cI = cy[aS] | |
465 | + | let cJ = cy[aT] | |
466 | + | let aY = valueOrElse(getInteger(aD(br)), 0) | |
467 | + | let bc = value(assetInfo(fromBase58String(O))).decimals | |
468 | + | let bg = if ((bn == O)) | |
478 | 469 | then { | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
489 | - | let | |
490 | - | let | |
470 | + | let cK = bD(O, br, bE, cy[aS]) | |
471 | + | let bY = cK._1 | |
472 | + | let bW = cK._2 | |
473 | + | let bX = cK._3 | |
474 | + | let bF = cK._4 | |
475 | + | let bZ = cK._5 | |
476 | + | let ck = cK._6 | |
477 | + | let cl = cK._7 | |
478 | + | let bP = cK._8 | |
479 | + | let bQ = cK._9 | |
480 | + | let bS = cK._10 | |
481 | + | let bC = [if ((bX > 0)) | |
491 | 482 | then true | |
492 | - | else f("unavailable to claim because user period allowance reached"), if (( | |
483 | + | else f("unavailable to claim because user period allowance reached"), if ((bW > 0)) | |
493 | 484 | then true | |
494 | - | else f("unavailable to claim because total period allowance reached"), if (( | |
485 | + | else f("unavailable to claim because total period allowance reached"), if ((bY > 0)) | |
495 | 486 | then true | |
496 | - | else f("nothing to claim"), if (( | |
487 | + | else f("nothing to claim"), if ((bZ > ck)) | |
497 | 488 | then true | |
498 | 489 | else f("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")] | |
499 | - | if (( | |
490 | + | if ((bC == bC)) | |
500 | 491 | then { | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | then [ScriptTransfer( | |
492 | + | let cL = (bW - bY) | |
493 | + | let cM = (bX - bY) | |
494 | + | let bg = if ((aY > bY)) | |
495 | + | then [ScriptTransfer(cq.caller, bY, cH), IntegerEntry(aD(br), (aY - bY))] | |
505 | 496 | else { | |
506 | - | let | |
507 | - | if (( | |
497 | + | let cN = split(h(invoke(this, "claimREADONLY", [O, br], nil)), c) | |
498 | + | if ((cN == cN)) | |
508 | 499 | then { | |
509 | - | let | |
510 | - | let | |
500 | + | let cO = parseIntValue(cN[3]) | |
501 | + | let cP = if ((cO == bY)) | |
511 | 502 | then { | |
512 | - | let | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | [StringEntry(aF( | |
503 | + | let cQ = parseIntValue(bs[T]) | |
504 | + | let cR = parseIntValue(bs[U]) | |
505 | + | let cS = parseIntValue(bs[V]) | |
506 | + | let cT = parseIntValue(bs[W]) | |
507 | + | let cU = parseIntValue(bs[X]) | |
508 | + | let cV = [toString(cQ), "0", toString(cS), toString(cT), toString(cU)] | |
509 | + | let cW = aM() | |
510 | + | let cX = parseIntValue(cW[T]) | |
511 | + | let cY = parseIntValue(cW[U]) | |
512 | + | let cZ = parseIntValue(cW[V]) | |
513 | + | let da = parseIntValue(cW[W]) | |
514 | + | let db = parseIntValue(cW[X]) | |
515 | + | let dc = (cY - cR) | |
516 | + | let dd = [toString(cX), toString(dc), toString(cZ), toString(da), toString(db)] | |
517 | + | let de = (valueOrElse(getInteger(aG()), 0) + cR) | |
518 | + | [StringEntry(aF(br), toString(cR)), StringEntry(aG(), toString(de)), aU(ai(br), cV, cy, bw, 0), aU(ak(), dd, cy, bw, 0)] | |
528 | 519 | } | |
529 | - | else [ | |
530 | - | let | |
531 | - | ([ScriptTransfer( | |
520 | + | else [aU(ai(br), bs, cy, bw, 0), aU(ak(), aM(), cy, bw, 0)] | |
521 | + | let df = ((aY + bE) - bY) | |
522 | + | ([ScriptTransfer(cq.caller, bY, cH), IntegerEntry(aD(br), df)] ++ cP) | |
532 | 523 | } | |
533 | 524 | else throw("Strict value is not equal to itself.") | |
534 | 525 | } | |
535 | - | $Tuple2(([IntegerEntry(ar(), | |
526 | + | $Tuple2(([IntegerEntry(ar(), bP), IntegerEntry(as(bP), bQ), IntegerEntry(au(bP), bS), IntegerEntry(az(O, bP), cL), IntegerEntry(aA(O, bP, br), cM), bl(br, bY, cJ, cq.transactionId)] ++ bg), unit) | |
536 | 527 | } | |
537 | 528 | else throw("Strict value is not equal to itself.") | |
538 | 529 | } | |
539 | 530 | else { | |
540 | - | let | |
541 | - | $Tuple2([ScriptTransfer( | |
531 | + | let dg = fraction(aY, e, pow(10, 0, bc, 0, 0, DOWN)) | |
532 | + | $Tuple2([ScriptTransfer(cq.caller, (bE + dg), cH), IntegerEntry(aD(br), 0), aU(ai(br), bs, cy, bw, aY), aU(ak(), aM(), cy, bw, aY), bl(br, cI, (cJ + dg), cq.transactionId)], unit) | |
542 | 533 | } | |
543 | - | | |
534 | + | bg | |
544 | 535 | } | |
545 | 536 | } | |
546 | 537 | ||
547 | 538 | ||
548 | 539 | ||
549 | - | @Callable( | |
550 | - | func cleanRemaingAmount ( | |
540 | + | @Callable(cq) | |
541 | + | func cleanRemaingAmount (br) = { | |
551 | 542 | let O = aJ()[D] | |
552 | - | let | |
553 | - | if (( | |
543 | + | let cN = split(h(invoke(this, "claimREADONLY", [O, br], nil)), c) | |
544 | + | if ((cN == cN)) | |
554 | 545 | then { | |
555 | - | let | |
556 | - | let | |
546 | + | let cO = parseIntValue(cN[2]) | |
547 | + | let dh = if ((cO == 0)) | |
557 | 548 | then true | |
558 | 549 | else f("user have unclaimed assets") | |
559 | - | if (( | |
550 | + | if ((dh == dh)) | |
560 | 551 | then { | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
552 | + | let di = split(value(getString(ai(br))), c) | |
553 | + | let cQ = parseIntValue(di[T]) | |
554 | + | let cR = parseIntValue(di[U]) | |
555 | + | let cS = parseIntValue(di[V]) | |
556 | + | let cT = parseIntValue(di[W]) | |
557 | + | let cU = parseIntValue(di[X]) | |
558 | + | let dj = if ((cR != 0)) | |
568 | 559 | then true | |
569 | 560 | else f("investorRemainingAmount already zero") | |
570 | - | if (( | |
561 | + | if ((dj == dj)) | |
571 | 562 | then { | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | [StringEntry(aF( | |
563 | + | let dk = makeString(["%d%d%d%d%d", toString(cQ), "0", toString(cS), toString(cT), toString(cU)], c) | |
564 | + | let cW = split(value(getString(ak())), c) | |
565 | + | let cX = parseIntValue(cW[T]) | |
566 | + | let cY = parseIntValue(cW[U]) | |
567 | + | let cZ = parseIntValue(cW[V]) | |
568 | + | let da = parseIntValue(cW[W]) | |
569 | + | let db = parseIntValue(cW[X]) | |
570 | + | let dl = makeString(["%d%d%d%d%d", toString(cX), toString((cY - cR)), toString(cZ), toString(da), toString(db)], c) | |
571 | + | let de = (valueOrElse(getInteger(aG()), 0) + cR) | |
572 | + | [StringEntry(aF(br), toString(cR)), StringEntry(aG(), toString(de)), StringEntry(ai(br), dk), StringEntry(ak(), dl)] | |
582 | 573 | } | |
583 | 574 | else throw("Strict value is not equal to itself.") | |
584 | 575 | } | |
589 | 580 | ||
590 | 581 | ||
591 | 582 | ||
592 | - | @Callable( | |
593 | - | func claimREADONLY ( | |
594 | - | let | |
595 | - | let | |
596 | - | let | |
597 | - | let | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | $Tuple2(nil, makeString(["%s%d%d", | |
583 | + | @Callable(cq) | |
584 | + | func claimREADONLY (bn,br) = { | |
585 | + | let cG = bm(bn, addressFromStringValue(br), fromBase58String("")) | |
586 | + | let cy = cG._1 | |
587 | + | let bE = cG._2 | |
588 | + | let cH = cG._3 | |
589 | + | let bs = cG._4 | |
590 | + | let bw = cG._5 | |
591 | + | let dm = cG._6 | |
592 | + | let cO = dm[0] | |
593 | + | let dn = dm[1] | |
594 | + | $Tuple2(nil, makeString(["%s%d%d", br, toString(cO), toString(dn)], c)) | |
604 | 595 | } | |
605 | 596 | ||
606 | 597 | ||
607 | 598 | ||
608 | - | @Callable( | |
609 | - | func claimV2READONLY ( | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | let O = | |
621 | - | let | |
622 | - | let | |
623 | - | let | |
624 | - | let | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | let | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
599 | + | @Callable(cq) | |
600 | + | func claimV2READONLY (bn,br) = { | |
601 | + | let cG = bm(bn, addressFromStringValue(br), fromBase58String("")) | |
602 | + | let cy = cG._1 | |
603 | + | let bE = cG._2 | |
604 | + | let cH = cG._3 | |
605 | + | let bs = cG._4 | |
606 | + | let bw = cG._5 | |
607 | + | let dm = cG._6 | |
608 | + | let cO = dm[0] | |
609 | + | let dn = dm[1] | |
610 | + | let bb = aJ() | |
611 | + | let O = bb[D] | |
612 | + | let aY = valueOrElse(getInteger(aD(br)), 0) | |
613 | + | let dg = (aY * 100) | |
614 | + | let do = (dn + dg) | |
615 | + | let dp = bD(O, br, bE, cy[aS]) | |
616 | + | let bY = dp._1 | |
617 | + | let bW = dp._2 | |
618 | + | let bX = dp._3 | |
619 | + | let bF = dp._4 | |
620 | + | let bZ = dp._5 | |
621 | + | let ck = dp._6 | |
622 | + | let cl = dp._7 | |
623 | + | let bP = dp._8 | |
624 | + | let bQ = dp._9 | |
625 | + | let bS = dp._10 | |
626 | + | let dq = valueOrElse(getInteger(au(bP)), 0) | |
627 | + | let dr = (parseIntValue(aO(br)[V]) - aY) | |
628 | + | let ds = if ((height > dq)) | |
638 | 629 | then { | |
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | makeString(["%d%d%d%d%d%d", toString( | |
630 | + | let dt = value(getInteger(aq())) | |
631 | + | let du = value(getInteger(ay(O))) | |
632 | + | let dv = value(getInteger(aw(O))) | |
633 | + | makeString(["%d%d%d%d%d%d", toString(do), toString(du), toString(dv), toString(bZ), toString(ck), toString(dt), toString(dr)], c) | |
643 | 634 | } | |
644 | - | else makeString(["%d%d%d%d%d%d", toString( | |
645 | - | $Tuple2(nil, | |
635 | + | else makeString(["%d%d%d%d%d%d", toString(do), toString(bY), toString(bW), toString(bZ), toString(ck), toString(cl), toString(dr)], c) | |
636 | + | $Tuple2(nil, ds) | |
646 | 637 | } | |
647 | 638 | ||
648 | 639 | ||
649 | - | ||
650 | - | @Callable(cp) | |
651 | - | func setManager (dv) = { | |
652 | - | let dw = co(cp) | |
653 | - | if ((dw == dw)) | |
654 | - | then { | |
655 | - | let dx = fromBase58String(dv) | |
656 | - | if ((dx == dx)) | |
657 | - | then [StringEntry(aI(), dv)] | |
658 | - | else throw("Strict value is not equal to itself.") | |
659 | - | } | |
660 | - | else throw("Strict value is not equal to itself.") | |
661 | - | } | |
662 | - | ||
663 | - | ||
664 | - | ||
665 | - | @Callable(cp) | |
666 | - | func confirmManager () = { | |
667 | - | let dy = cn() | |
668 | - | let dz = if (isDefined(dy)) | |
669 | - | then true | |
670 | - | else throw("No pending manager") | |
671 | - | if ((dz == dz)) | |
672 | - | then { | |
673 | - | let dA = if ((cp.callerPublicKey == value(dy))) | |
674 | - | then true | |
675 | - | else throw("You are not pending manager") | |
676 | - | if ((dA == dA)) | |
677 | - | then [StringEntry(aH(), toBase58String(value(dy))), DeleteEntry(aI())] | |
678 | - | else throw("Strict value is not equal to itself.") | |
679 | - | } | |
680 | - | else throw("Strict value is not equal to itself.") | |
681 | - | } | |
682 | - | ||
683 | - | ||
684 | - | @Verifier(dB) | |
685 | - | func dC () = { | |
686 | - | let dD = { | |
687 | - | let j = cl() | |
640 | + | @Verifier(dw) | |
641 | + | func dx () = { | |
642 | + | let dy = { | |
643 | + | let j = cm() | |
688 | 644 | if ($isInstanceOf(j, "ByteVector")) | |
689 | 645 | then { | |
690 | - | let | |
691 | - | | |
646 | + | let cs = j | |
647 | + | cs | |
692 | 648 | } | |
693 | 649 | else if ($isInstanceOf(j, "Unit")) | |
694 | - | then | |
650 | + | then dw.senderPublicKey | |
695 | 651 | else throw("Match error") | |
696 | 652 | } | |
697 | - | sigVerify( | |
653 | + | sigVerify(dw.bodyBytes, dw.proofs[0], dy) | |
698 | 654 | } | |
699 | 655 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = valueOrErrorMessage(getString(b), (("mandatory this." + b) + " is not defined")) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | let c = "__" | |
8 | 8 | ||
9 | 9 | let d = toBigInt(1000000000000000000) | |
10 | 10 | ||
11 | 11 | let e = 100000000 | |
12 | 12 | ||
13 | 13 | func f (g) = throw(makeString(["ido.ride:", g], " ")) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func h (i) = { | |
17 | 17 | let j = i | |
18 | 18 | if ($isInstanceOf(j, "String")) | |
19 | 19 | then { | |
20 | 20 | let k = j | |
21 | 21 | k | |
22 | 22 | } | |
23 | 23 | else throw("fail to cast into String") | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func l (m,n,o,p,q) = { | |
28 | 28 | let r = toBigInt(n) | |
29 | 29 | let s = toBigInt(q) | |
30 | 30 | let t = fraction(toBigInt(m), d, r) | |
31 | 31 | let u = fraction(t, toBigInt(p), toBigInt(o)) | |
32 | 32 | toInt(fraction(u, toBigInt(q), d)) | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | let v = 1 | |
37 | 37 | ||
38 | 38 | let w = 2 | |
39 | 39 | ||
40 | 40 | let x = 3 | |
41 | 41 | ||
42 | 42 | let y = 4 | |
43 | 43 | ||
44 | 44 | let z = 5 | |
45 | 45 | ||
46 | 46 | let A = 6 | |
47 | 47 | ||
48 | 48 | let B = 7 | |
49 | 49 | ||
50 | 50 | let C = 8 | |
51 | 51 | ||
52 | 52 | let D = 9 | |
53 | 53 | ||
54 | 54 | let E = 10 | |
55 | 55 | ||
56 | 56 | let F = 11 | |
57 | 57 | ||
58 | 58 | func G (H,I,J,K,o,L,M,N,O,P,Q,R) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", H, I, J, K, o, L, M, N, O, P, Q, R], c) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func S (H,I,J,K,o,L,M,N,O,P,Q,R) = G(toString(H), toString(I), toString(J), toString(K), toString(o), toString(L), M, toString(N), O, toString(P), toString(Q), toString(R)) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | let T = 1 | |
65 | 65 | ||
66 | 66 | let U = 2 | |
67 | 67 | ||
68 | 68 | let V = 3 | |
69 | 69 | ||
70 | 70 | let W = 4 | |
71 | 71 | ||
72 | 72 | let X = 5 | |
73 | 73 | ||
74 | 74 | func Y (Z,aa,ab,ac,ad) = makeString(["%d%d%d%d%d", Z, aa, ab, ac, ad], c) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func ae (Z,aa,ab,ac,ad) = Y(toString(Z), toString(aa), toString(ab), toString(ac), toString(ad)) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func af (m,ag) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(m), toString(ag)], c) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func ah () = "%s__config" | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func ai (aj) = ("%s__" + aj) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func ak () = "%s__totals" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func al (am,aj,an) = makeString(["%s%s%s%s__history", am, aj, an], c) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func ao () = "%s__usdnClaimDisabled" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func ap () = "%s__usdnClaimEndHeight" | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func aq () = makeString(["%s", "periodLength"], c) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func ar () = makeString(["%s", "currentPeriod"], c) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func as (at) = makeString(["%s%s", "periodStartHeight", toString(at)], c) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func au (at) = makeString(["%s%s", "periodEndHeight", toString(at)], c) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func av () = makeString(["%s", "usdtPriceAssetAllowableRatio"], c) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func aw (ax) = makeString(["%s%s", "totalPeriodAllowance", ax], c) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func ay (ax) = makeString(["%s%s", "userPeriodAllowance", ax], c) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func az (ax,at) = makeString(["%s%s%s", "periodTotalAvailableToClaim", ax, toString(at)], c) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func aA (ax,at,aj) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", ax, toString(at), aj], c) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func aB () = makeString(["%s", "usdtPriceAssetStablePool"], c) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func aC () = makeString(["%s", "usdtAssetId"], c) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func aD (aE) = makeString(["%s%s", "priceAssetBalance", aE], c) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func aF (aE) = makeString(["%s%s", "investorRemainingAmount", aE], c) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func aG () = makeString(["%s", "totalRemainingAmount"], c) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func aH () = "%s__managerPublicKey" | |
144 | 144 | ||
145 | 145 | ||
146 | - | func aI () = "%s__ | |
146 | + | func aI () = "%s__managerVaultAddress" | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func aJ () = split(a(ah()), c) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func aK (aL) = split(valueOrElse(getString(aL), Y("0", "0", "0", "0", "0")), c) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func aM () = aK(ak()) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func aN (aj) = aK(ai(aj)) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func aO (aj) = split(a(ai(aj)), c) | |
162 | 162 | ||
163 | 163 | ||
164 | - | ||
164 | + | func aP () = addressFromStringValue(getStringValue(aI())) | |
165 | 165 | ||
166 | - | let aQ = 1 | |
167 | 166 | ||
168 | - | let | |
167 | + | let aQ = 0 | |
169 | 168 | ||
170 | - | let | |
169 | + | let aR = 1 | |
171 | 170 | ||
172 | - | func aT (b,aU,aV,aW,aX) = { | |
173 | - | let Z = parseIntValue(aU[T]) | |
174 | - | let aa = parseIntValue(aU[U]) | |
175 | - | let ab = parseIntValue(aU[V]) | |
176 | - | let ac = parseIntValue(aU[W]) | |
177 | - | let ad = parseIntValue(aU[X]) | |
178 | - | let aY = (Z + aV[aP]) | |
179 | - | let aZ = (aa + aV[aQ]) | |
180 | - | let ba = aJ() | |
181 | - | let O = ba[D] | |
182 | - | let bb = value(assetInfo(fromBase58String(O))).decimals | |
183 | - | let bc = fraction(aX, e, pow(10, 0, bb, 0, 0, DOWN)) | |
184 | - | let bd = ((ab + aV[aR]) - aX) | |
185 | - | let be = ((ac + aV[aS]) + bc) | |
186 | - | let bf = if ((0 > aZ)) | |
171 | + | let aS = 2 | |
172 | + | ||
173 | + | let aT = 3 | |
174 | + | ||
175 | + | func aU (b,aV,aW,aX,aY) = { | |
176 | + | let Z = parseIntValue(aV[T]) | |
177 | + | let aa = parseIntValue(aV[U]) | |
178 | + | let ab = parseIntValue(aV[V]) | |
179 | + | let ac = parseIntValue(aV[W]) | |
180 | + | let ad = parseIntValue(aV[X]) | |
181 | + | let aZ = (Z + aW[aQ]) | |
182 | + | let ba = (aa + aW[aR]) | |
183 | + | let bb = aJ() | |
184 | + | let O = bb[D] | |
185 | + | let bc = value(assetInfo(fromBase58String(O))).decimals | |
186 | + | let bd = fraction(aY, e, pow(10, 0, bc, 0, 0, DOWN)) | |
187 | + | let be = ((ab + aW[aS]) - aY) | |
188 | + | let bf = ((ac + aW[aT]) + bd) | |
189 | + | let bg = if ((0 > ba)) | |
187 | 190 | then { | |
188 | - | let | |
189 | - | let | |
191 | + | let bh = ((aZ - be) - bf) | |
192 | + | let bi = if ((0 > bh)) | |
190 | 193 | then 0 | |
191 | - | else | |
192 | - | StringEntry(b, ae( | |
194 | + | else bh | |
195 | + | StringEntry(b, ae(aZ, bi, be, bf, aX)) | |
193 | 196 | } | |
194 | - | else StringEntry(b, ae( | |
195 | - | | |
197 | + | else StringEntry(b, ae(aZ, ba, be, bf, aX)) | |
198 | + | bg | |
196 | 199 | } | |
197 | 200 | ||
198 | 201 | ||
199 | - | func | |
202 | + | func bj (aj,m,ag,bk) = StringEntry(al("invest", aj, toBase58String(bk)), af(m, ag)) | |
200 | 203 | ||
201 | 204 | ||
202 | - | func | |
205 | + | func bl (aj,m,ag,bk) = StringEntry(al("claim", aj, toBase58String(bk)), af(m, ag)) | |
203 | 206 | ||
204 | 207 | ||
205 | - | func | |
206 | - | let | |
207 | - | let J = parseIntValue( | |
208 | - | let K = parseIntValue( | |
209 | - | let | |
210 | - | let o = parseIntValue( | |
211 | - | let L = parseIntValue( | |
212 | - | let M = | |
213 | - | let | |
214 | - | let N = parseIntValue( | |
215 | - | let O = | |
216 | - | let | |
217 | - | let P = parseIntValue( | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
208 | + | func bm (bn,aj,bk) = { | |
209 | + | let bb = aJ() | |
210 | + | let J = parseIntValue(bb[x]) | |
211 | + | let K = parseIntValue(bb[y]) | |
212 | + | let bo = (J + K) | |
213 | + | let o = parseIntValue(bb[z]) | |
214 | + | let L = parseIntValue(bb[A]) | |
215 | + | let M = bb[B] | |
216 | + | let bp = fromBase58String(M) | |
217 | + | let N = parseIntValue(bb[C]) | |
218 | + | let O = bb[D] | |
219 | + | let bq = fromBase58String(O) | |
220 | + | let P = parseIntValue(bb[E]) | |
221 | + | let br = toString(aj) | |
222 | + | let bs = aO(br) | |
223 | + | let bt = parseIntValue(bs[T]) | |
224 | + | let bu = parseIntValue(bs[X]) | |
225 | + | let bv = if ((J >= bu)) | |
223 | 226 | then J | |
224 | - | else | |
225 | - | let | |
226 | - | then | |
227 | + | else bu | |
228 | + | let bw = if ((height > bo)) | |
229 | + | then bo | |
227 | 230 | else if ((J > height)) | |
228 | 231 | then J | |
229 | 232 | else height | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | then | |
233 | + | let bx = (bw - bv) | |
234 | + | let by = fraction(bt, bx, K) | |
235 | + | let bz = l(by, P, o, L, N) | |
236 | + | let bA = (bn == O) | |
237 | + | let bB = valueOrElse(getBoolean(ao()), false) | |
238 | + | let bC = [if (!(if (bA) | |
239 | + | then bB | |
237 | 240 | else false)) | |
238 | 241 | then true | |
239 | 242 | else throw("USDN claim is disabled")] | |
240 | - | if (( | |
241 | - | then if (( | |
242 | - | then $Tuple6([0, -( | |
243 | - | else if (( | |
244 | - | then $Tuple6([0, -( | |
245 | - | else throw(("unsupported assetId: " + | |
243 | + | if ((bC == bC)) | |
244 | + | then if ((bn == O)) | |
245 | + | then $Tuple6([0, -(by), by, 0], by, bq, bs, bw, [by, bz]) | |
246 | + | else if ((bn == M)) | |
247 | + | then $Tuple6([0, -(by), 0, bz], bz, bp, bs, bw, [by, bz]) | |
248 | + | else throw(("unsupported assetId: " + bn)) | |
246 | 249 | else throw("Strict value is not equal to itself.") | |
247 | 250 | } | |
248 | 251 | ||
249 | 252 | ||
250 | - | func | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
253 | + | func bD (O,br,bE,bF) = { | |
254 | + | let bG = value(getInteger(aw(O))) | |
255 | + | let bH = value(getInteger(ay(O))) | |
256 | + | let bI = value(getInteger(aq())) | |
257 | + | let bJ = valueOrElse(getInteger(ar()), 0) | |
258 | + | let bK = isDefined(getInteger(au(0))) | |
259 | + | let bL = if ((bJ > 0)) | |
257 | 260 | then { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | + | let bM = value(getInteger(as(bJ))) | |
262 | + | let bN = value(getInteger(au(bJ))) | |
263 | + | let bO = if ((height > bN)) | |
261 | 264 | then { | |
262 | - | let | |
263 | - | let | |
265 | + | let bP = (bJ + 1) | |
266 | + | let bQ = if ((height > (bN + bI))) | |
264 | 267 | then { | |
265 | - | let | |
266 | - | if (( | |
267 | - | then ((height - | |
268 | - | else (height - | |
268 | + | let bR = ((height - bN) % bI) | |
269 | + | if ((bR == 0)) | |
270 | + | then ((height - bI) + 1) | |
271 | + | else (height - bR) | |
269 | 272 | } | |
270 | - | else ( | |
271 | - | let | |
272 | - | $Tuple3( | |
273 | + | else (bN + 1) | |
274 | + | let bS = ((bQ + bI) - 1) | |
275 | + | $Tuple3(bP, bQ, bS) | |
273 | 276 | } | |
274 | - | else $Tuple3( | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | $Tuple3( | |
277 | + | else $Tuple3(bJ, bM, bN) | |
278 | + | let bP = bO._1 | |
279 | + | let bQ = bO._2 | |
280 | + | let bS = bO._3 | |
281 | + | $Tuple3(bP, bQ, bS) | |
279 | 282 | } | |
280 | - | else if ( | |
283 | + | else if (bK) | |
281 | 284 | then { | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
285 | + | let bT = value(getInteger(as(0))) | |
286 | + | let bU = value(getInteger(au(0))) | |
287 | + | let bV = if ((height > bU)) | |
285 | 288 | then { | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | $Tuple3( | |
289 | + | let bP = (bJ + 1) | |
290 | + | let bQ = (bU + 1) | |
291 | + | let bS = ((bQ + bI) - 1) | |
292 | + | $Tuple3(bP, bQ, bS) | |
290 | 293 | } | |
291 | - | else $Tuple3( | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | $Tuple3( | |
294 | + | else $Tuple3(bJ, bT, bU) | |
295 | + | let bP = bV._1 | |
296 | + | let bQ = bV._2 | |
297 | + | let bS = bV._3 | |
298 | + | $Tuple3(bP, bQ, bS) | |
296 | 299 | } | |
297 | - | else $Tuple3( | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | if ($isInstanceOf( | |
310 | - | then | |
311 | - | else throw(($getType( | |
300 | + | else $Tuple3(bJ, valueOrElse(getInteger(as(bJ)), height), valueOrElse(getInteger(au(bJ)), ((height + bI) - 1))) | |
301 | + | let bP = bL._1 | |
302 | + | let bQ = bL._2 | |
303 | + | let bS = bL._3 | |
304 | + | let bW = valueOrElse(getInteger(az(O, bP)), bG) | |
305 | + | let bX = valueOrElse(getInteger(aA(O, bP, br)), bH) | |
306 | + | let aY = valueOrElse(getInteger(aD(br)), 0) | |
307 | + | let bY = min([(bE + aY), bW, bX]) | |
308 | + | let bZ = value(getInteger(av())) | |
309 | + | let ca = e | |
310 | + | let cb = { | |
311 | + | let cc = invoke(addressFromStringValue(value(getString(aB()))), "putOneTknV2WithoutTakeFeeREADONLY", [ca, O], nil) | |
312 | + | if ($isInstanceOf(cc, "(Int, Int, Int)")) | |
313 | + | then cc | |
314 | + | else throw(($getType(cc) + " couldn't be cast to (Int, Int, Int)")) | |
312 | 315 | } | |
313 | - | if (( | |
316 | + | if ((cb == cb)) | |
314 | 317 | then { | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | if ($isInstanceOf( | |
322 | - | then | |
323 | - | else throw(($getType( | |
318 | + | let cd = cb._3 | |
319 | + | let ce = cb._2 | |
320 | + | let cf = cb._1 | |
321 | + | let cg = value(getString(aC())) | |
322 | + | let ch = { | |
323 | + | let cc = invoke(addressFromStringValue(value(getString(aB()))), "getOneTknV2READONLY", [cg, cf], nil) | |
324 | + | if ($isInstanceOf(cc, "(Int, Int)")) | |
325 | + | then cc | |
326 | + | else throw(($getType(cc) + " couldn't be cast to (Int, Int)")) | |
324 | 327 | } | |
325 | - | if (( | |
328 | + | if ((ch == ch)) | |
326 | 329 | then { | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | $Tuple10( | |
330 | + | let ci = ch._2 | |
331 | + | let cj = ch._1 | |
332 | + | let ck = fraction(ca, e, cj) | |
333 | + | let cl = (bS - height) | |
334 | + | $Tuple10(bY, bW, bX, bF, bZ, ck, cl, bP, bQ, bS) | |
332 | 335 | } | |
333 | 336 | else throw("Strict value is not equal to itself.") | |
334 | 337 | } | |
335 | 338 | else throw("Strict value is not equal to itself.") | |
336 | 339 | } | |
337 | 340 | ||
338 | 341 | ||
339 | - | func cl () = { | |
340 | - | let j = getString(aH()) | |
342 | + | func cm () = { | |
343 | + | let cn = aP() | |
344 | + | let j = getString(cn, aH()) | |
341 | 345 | if ($isInstanceOf(j, "String")) | |
342 | 346 | then { | |
343 | - | let | |
344 | - | fromBase58String( | |
347 | + | let co = j | |
348 | + | fromBase58String(co) | |
345 | 349 | } | |
346 | 350 | else if ($isInstanceOf(j, "Unit")) | |
347 | 351 | then unit | |
348 | 352 | else throw("Match error") | |
349 | 353 | } | |
350 | 354 | ||
351 | 355 | ||
352 | - | func cn () = { | |
353 | - | let j = getString(aI()) | |
354 | - | if ($isInstanceOf(j, "String")) | |
356 | + | func cp (cq) = { | |
357 | + | let cr = throw("Permission denied") | |
358 | + | let j = cm() | |
359 | + | if ($isInstanceOf(j, "ByteVector")) | |
355 | 360 | then { | |
356 | - | let cm = j | |
357 | - | fromBase58String(cm) | |
361 | + | let cs = j | |
362 | + | if ((cq.callerPublicKey == cs)) | |
363 | + | then true | |
364 | + | else cr | |
358 | 365 | } | |
359 | 366 | else if ($isInstanceOf(j, "Unit")) | |
360 | - | then unit | |
367 | + | then if ((cq.caller == this)) | |
368 | + | then true | |
369 | + | else cr | |
361 | 370 | else throw("Match error") | |
362 | 371 | } | |
363 | 372 | ||
364 | 373 | ||
365 | - | func co (cp) = { | |
366 | - | let cq = throw("Permission denied") | |
367 | - | let j = cl() | |
368 | - | if ($isInstanceOf(j, "ByteVector")) | |
369 | - | then { | |
370 | - | let cr = j | |
371 | - | if ((cp.callerPublicKey == cr)) | |
372 | - | then true | |
373 | - | else cq | |
374 | - | } | |
375 | - | else if ($isInstanceOf(j, "Unit")) | |
376 | - | then if ((cp.caller == this)) | |
377 | - | then true | |
378 | - | else cq | |
379 | - | else throw("Match error") | |
380 | - | } | |
381 | - | ||
382 | - | ||
383 | - | @Callable(cp) | |
374 | + | @Callable(cq) | |
384 | 375 | func constructor (H,I,J,K,o,O,Q) = { | |
385 | 376 | let L = ((100 * 1000) * 1000) | |
386 | - | let | |
377 | + | let ct = (H + I) | |
387 | 378 | if (isDefined(getString(ah()))) | |
388 | 379 | then throw("already initialized") | |
389 | - | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString( | |
380 | + | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(cq.caller))) | |
390 | 381 | then throw("not authorized") | |
391 | - | else if ((size( | |
382 | + | else if ((size(cq.payments) != 1)) | |
392 | 383 | then throw("exactly 1 payment must be attached") | |
393 | - | else if (( | |
384 | + | else if ((ct >= J)) | |
394 | 385 | then throw("claimStart must be greater than idoEnd") | |
395 | 386 | else { | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let M = toBase58String( | |
400 | - | let N = pow(10, 0, | |
401 | - | let | |
402 | - | let | |
403 | - | let P = pow(10, 0, | |
404 | - | let | |
405 | - | let | |
406 | - | [StringEntry(ah(), S(H, I, J, K, o, L, M, N, O, P, Q, | |
387 | + | let cu = value(cq.payments[0]) | |
388 | + | let bp = value(cu.assetId) | |
389 | + | let cv = valueOrErrorMessage(assetInfo(bp), "fail to load ido asset info") | |
390 | + | let M = toBase58String(bp) | |
391 | + | let N = pow(10, 0, cv.decimals, 0, 0, DOWN) | |
392 | + | let bq = fromBase58String(O) | |
393 | + | let cw = valueOrErrorMessage(assetInfo(bq), "fail to load price asset info") | |
394 | + | let P = pow(10, 0, cw.decimals, 0, 0, DOWN) | |
395 | + | let cx = aM() | |
396 | + | let cy = [0, 0, 0, 0] | |
397 | + | [StringEntry(ah(), S(H, I, J, K, o, L, M, N, O, P, Q, cu.amount)), aU(ak(), cx, cy, J, 0)] | |
407 | 398 | } | |
408 | 399 | } | |
409 | 400 | ||
410 | 401 | ||
411 | 402 | ||
412 | - | @Callable( | |
403 | + | @Callable(cq) | |
413 | 404 | func invest () = { | |
414 | - | let | |
415 | - | let H = parseIntValue( | |
416 | - | let I = parseIntValue( | |
417 | - | let | |
418 | - | let J = parseIntValue( | |
419 | - | let K = parseIntValue( | |
420 | - | let o = parseIntValue( | |
421 | - | let L = parseIntValue( | |
422 | - | let M = | |
423 | - | let | |
424 | - | let N = parseIntValue( | |
425 | - | let O = | |
426 | - | let | |
427 | - | let P = parseIntValue( | |
428 | - | let | |
429 | - | let aj = toString( | |
405 | + | let bb = aJ() | |
406 | + | let H = parseIntValue(bb[v]) | |
407 | + | let I = parseIntValue(bb[w]) | |
408 | + | let ct = (H + I) | |
409 | + | let J = parseIntValue(bb[x]) | |
410 | + | let K = parseIntValue(bb[y]) | |
411 | + | let o = parseIntValue(bb[z]) | |
412 | + | let L = parseIntValue(bb[A]) | |
413 | + | let M = bb[B] | |
414 | + | let bp = fromBase58String(M) | |
415 | + | let N = parseIntValue(bb[C]) | |
416 | + | let O = bb[D] | |
417 | + | let bq = fromBase58String(O) | |
418 | + | let P = parseIntValue(bb[E]) | |
419 | + | let cz = parseIntValue(bb[F]) | |
420 | + | let aj = toString(cq.caller) | |
430 | 421 | if ((H > height)) | |
431 | 422 | then throw("ido has not been started yet") | |
432 | - | else if ((height > | |
423 | + | else if ((height > ct)) | |
433 | 424 | then throw("ido has been already ended") | |
434 | - | else if ((size( | |
425 | + | else if ((size(cq.payments) != 1)) | |
435 | 426 | then throw("exactly 1 payment is expected") | |
436 | 427 | else { | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | if (( | |
441 | - | then throw((("invalid payment asset id: " + toBase58String( | |
428 | + | let cu = value(cq.payments[0]) | |
429 | + | let cA = value(cu.assetId) | |
430 | + | let cB = cu.amount | |
431 | + | if ((cA != bq)) | |
432 | + | then throw((("invalid payment asset id: " + toBase58String(cA)) + " is expected")) | |
442 | 433 | else { | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | if (( | |
434 | + | let cC = aN(aj) | |
435 | + | let cx = aM() | |
436 | + | let cD = (parseIntValue(cx[T]) + cB) | |
437 | + | let cE = (cD * 100) | |
438 | + | if ((cE > assetBalance(this, bp))) | |
448 | 439 | then throw("IDO asset has been - sold consider to use smaller payment") | |
449 | 440 | else { | |
450 | - | let | |
451 | - | [ | |
441 | + | let cy = [cB, cB, 0, 0] | |
442 | + | [aU(ai(aj), cC, cy, J, 0), aU(ak(), cx, cy, J, 0), bj(aj, cB, 0, cq.transactionId)] | |
452 | 443 | } | |
453 | 444 | } | |
454 | 445 | } | |
455 | 446 | } | |
456 | 447 | ||
457 | 448 | ||
458 | 449 | ||
459 | - | @Callable( | |
460 | - | func claim ( | |
461 | - | let | |
462 | - | if (( | |
450 | + | @Callable(cq) | |
451 | + | func claim (bn,br) = { | |
452 | + | let cF = toString(cq.caller) | |
453 | + | if ((br != cF)) | |
463 | 454 | then throw("not authorized") | |
464 | 455 | else { | |
465 | - | let | |
466 | - | let O = | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
456 | + | let bb = aJ() | |
457 | + | let O = bb[D] | |
458 | + | let cG = bm(bn, cq.caller, cq.transactionId) | |
459 | + | let cy = cG._1 | |
460 | + | let bE = cG._2 | |
461 | + | let cH = cG._3 | |
462 | + | let bs = cG._4 | |
463 | + | let bw = cG._5 | |
464 | + | let cI = cy[aS] | |
465 | + | let cJ = cy[aT] | |
466 | + | let aY = valueOrElse(getInteger(aD(br)), 0) | |
467 | + | let bc = value(assetInfo(fromBase58String(O))).decimals | |
468 | + | let bg = if ((bn == O)) | |
478 | 469 | then { | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
489 | - | let | |
490 | - | let | |
470 | + | let cK = bD(O, br, bE, cy[aS]) | |
471 | + | let bY = cK._1 | |
472 | + | let bW = cK._2 | |
473 | + | let bX = cK._3 | |
474 | + | let bF = cK._4 | |
475 | + | let bZ = cK._5 | |
476 | + | let ck = cK._6 | |
477 | + | let cl = cK._7 | |
478 | + | let bP = cK._8 | |
479 | + | let bQ = cK._9 | |
480 | + | let bS = cK._10 | |
481 | + | let bC = [if ((bX > 0)) | |
491 | 482 | then true | |
492 | - | else f("unavailable to claim because user period allowance reached"), if (( | |
483 | + | else f("unavailable to claim because user period allowance reached"), if ((bW > 0)) | |
493 | 484 | then true | |
494 | - | else f("unavailable to claim because total period allowance reached"), if (( | |
485 | + | else f("unavailable to claim because total period allowance reached"), if ((bY > 0)) | |
495 | 486 | then true | |
496 | - | else f("nothing to claim"), if (( | |
487 | + | else f("nothing to claim"), if ((bZ > ck)) | |
497 | 488 | then true | |
498 | 489 | else f("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")] | |
499 | - | if (( | |
490 | + | if ((bC == bC)) | |
500 | 491 | then { | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | then [ScriptTransfer( | |
492 | + | let cL = (bW - bY) | |
493 | + | let cM = (bX - bY) | |
494 | + | let bg = if ((aY > bY)) | |
495 | + | then [ScriptTransfer(cq.caller, bY, cH), IntegerEntry(aD(br), (aY - bY))] | |
505 | 496 | else { | |
506 | - | let | |
507 | - | if (( | |
497 | + | let cN = split(h(invoke(this, "claimREADONLY", [O, br], nil)), c) | |
498 | + | if ((cN == cN)) | |
508 | 499 | then { | |
509 | - | let | |
510 | - | let | |
500 | + | let cO = parseIntValue(cN[3]) | |
501 | + | let cP = if ((cO == bY)) | |
511 | 502 | then { | |
512 | - | let | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | [StringEntry(aF( | |
503 | + | let cQ = parseIntValue(bs[T]) | |
504 | + | let cR = parseIntValue(bs[U]) | |
505 | + | let cS = parseIntValue(bs[V]) | |
506 | + | let cT = parseIntValue(bs[W]) | |
507 | + | let cU = parseIntValue(bs[X]) | |
508 | + | let cV = [toString(cQ), "0", toString(cS), toString(cT), toString(cU)] | |
509 | + | let cW = aM() | |
510 | + | let cX = parseIntValue(cW[T]) | |
511 | + | let cY = parseIntValue(cW[U]) | |
512 | + | let cZ = parseIntValue(cW[V]) | |
513 | + | let da = parseIntValue(cW[W]) | |
514 | + | let db = parseIntValue(cW[X]) | |
515 | + | let dc = (cY - cR) | |
516 | + | let dd = [toString(cX), toString(dc), toString(cZ), toString(da), toString(db)] | |
517 | + | let de = (valueOrElse(getInteger(aG()), 0) + cR) | |
518 | + | [StringEntry(aF(br), toString(cR)), StringEntry(aG(), toString(de)), aU(ai(br), cV, cy, bw, 0), aU(ak(), dd, cy, bw, 0)] | |
528 | 519 | } | |
529 | - | else [ | |
530 | - | let | |
531 | - | ([ScriptTransfer( | |
520 | + | else [aU(ai(br), bs, cy, bw, 0), aU(ak(), aM(), cy, bw, 0)] | |
521 | + | let df = ((aY + bE) - bY) | |
522 | + | ([ScriptTransfer(cq.caller, bY, cH), IntegerEntry(aD(br), df)] ++ cP) | |
532 | 523 | } | |
533 | 524 | else throw("Strict value is not equal to itself.") | |
534 | 525 | } | |
535 | - | $Tuple2(([IntegerEntry(ar(), | |
526 | + | $Tuple2(([IntegerEntry(ar(), bP), IntegerEntry(as(bP), bQ), IntegerEntry(au(bP), bS), IntegerEntry(az(O, bP), cL), IntegerEntry(aA(O, bP, br), cM), bl(br, bY, cJ, cq.transactionId)] ++ bg), unit) | |
536 | 527 | } | |
537 | 528 | else throw("Strict value is not equal to itself.") | |
538 | 529 | } | |
539 | 530 | else { | |
540 | - | let | |
541 | - | $Tuple2([ScriptTransfer( | |
531 | + | let dg = fraction(aY, e, pow(10, 0, bc, 0, 0, DOWN)) | |
532 | + | $Tuple2([ScriptTransfer(cq.caller, (bE + dg), cH), IntegerEntry(aD(br), 0), aU(ai(br), bs, cy, bw, aY), aU(ak(), aM(), cy, bw, aY), bl(br, cI, (cJ + dg), cq.transactionId)], unit) | |
542 | 533 | } | |
543 | - | | |
534 | + | bg | |
544 | 535 | } | |
545 | 536 | } | |
546 | 537 | ||
547 | 538 | ||
548 | 539 | ||
549 | - | @Callable( | |
550 | - | func cleanRemaingAmount ( | |
540 | + | @Callable(cq) | |
541 | + | func cleanRemaingAmount (br) = { | |
551 | 542 | let O = aJ()[D] | |
552 | - | let | |
553 | - | if (( | |
543 | + | let cN = split(h(invoke(this, "claimREADONLY", [O, br], nil)), c) | |
544 | + | if ((cN == cN)) | |
554 | 545 | then { | |
555 | - | let | |
556 | - | let | |
546 | + | let cO = parseIntValue(cN[2]) | |
547 | + | let dh = if ((cO == 0)) | |
557 | 548 | then true | |
558 | 549 | else f("user have unclaimed assets") | |
559 | - | if (( | |
550 | + | if ((dh == dh)) | |
560 | 551 | then { | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
552 | + | let di = split(value(getString(ai(br))), c) | |
553 | + | let cQ = parseIntValue(di[T]) | |
554 | + | let cR = parseIntValue(di[U]) | |
555 | + | let cS = parseIntValue(di[V]) | |
556 | + | let cT = parseIntValue(di[W]) | |
557 | + | let cU = parseIntValue(di[X]) | |
558 | + | let dj = if ((cR != 0)) | |
568 | 559 | then true | |
569 | 560 | else f("investorRemainingAmount already zero") | |
570 | - | if (( | |
561 | + | if ((dj == dj)) | |
571 | 562 | then { | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | [StringEntry(aF( | |
563 | + | let dk = makeString(["%d%d%d%d%d", toString(cQ), "0", toString(cS), toString(cT), toString(cU)], c) | |
564 | + | let cW = split(value(getString(ak())), c) | |
565 | + | let cX = parseIntValue(cW[T]) | |
566 | + | let cY = parseIntValue(cW[U]) | |
567 | + | let cZ = parseIntValue(cW[V]) | |
568 | + | let da = parseIntValue(cW[W]) | |
569 | + | let db = parseIntValue(cW[X]) | |
570 | + | let dl = makeString(["%d%d%d%d%d", toString(cX), toString((cY - cR)), toString(cZ), toString(da), toString(db)], c) | |
571 | + | let de = (valueOrElse(getInteger(aG()), 0) + cR) | |
572 | + | [StringEntry(aF(br), toString(cR)), StringEntry(aG(), toString(de)), StringEntry(ai(br), dk), StringEntry(ak(), dl)] | |
582 | 573 | } | |
583 | 574 | else throw("Strict value is not equal to itself.") | |
584 | 575 | } | |
585 | 576 | else throw("Strict value is not equal to itself.") | |
586 | 577 | } | |
587 | 578 | else throw("Strict value is not equal to itself.") | |
588 | 579 | } | |
589 | 580 | ||
590 | 581 | ||
591 | 582 | ||
592 | - | @Callable( | |
593 | - | func claimREADONLY ( | |
594 | - | let | |
595 | - | let | |
596 | - | let | |
597 | - | let | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | $Tuple2(nil, makeString(["%s%d%d", | |
583 | + | @Callable(cq) | |
584 | + | func claimREADONLY (bn,br) = { | |
585 | + | let cG = bm(bn, addressFromStringValue(br), fromBase58String("")) | |
586 | + | let cy = cG._1 | |
587 | + | let bE = cG._2 | |
588 | + | let cH = cG._3 | |
589 | + | let bs = cG._4 | |
590 | + | let bw = cG._5 | |
591 | + | let dm = cG._6 | |
592 | + | let cO = dm[0] | |
593 | + | let dn = dm[1] | |
594 | + | $Tuple2(nil, makeString(["%s%d%d", br, toString(cO), toString(dn)], c)) | |
604 | 595 | } | |
605 | 596 | ||
606 | 597 | ||
607 | 598 | ||
608 | - | @Callable( | |
609 | - | func claimV2READONLY ( | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | let O = | |
621 | - | let | |
622 | - | let | |
623 | - | let | |
624 | - | let | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | let | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
599 | + | @Callable(cq) | |
600 | + | func claimV2READONLY (bn,br) = { | |
601 | + | let cG = bm(bn, addressFromStringValue(br), fromBase58String("")) | |
602 | + | let cy = cG._1 | |
603 | + | let bE = cG._2 | |
604 | + | let cH = cG._3 | |
605 | + | let bs = cG._4 | |
606 | + | let bw = cG._5 | |
607 | + | let dm = cG._6 | |
608 | + | let cO = dm[0] | |
609 | + | let dn = dm[1] | |
610 | + | let bb = aJ() | |
611 | + | let O = bb[D] | |
612 | + | let aY = valueOrElse(getInteger(aD(br)), 0) | |
613 | + | let dg = (aY * 100) | |
614 | + | let do = (dn + dg) | |
615 | + | let dp = bD(O, br, bE, cy[aS]) | |
616 | + | let bY = dp._1 | |
617 | + | let bW = dp._2 | |
618 | + | let bX = dp._3 | |
619 | + | let bF = dp._4 | |
620 | + | let bZ = dp._5 | |
621 | + | let ck = dp._6 | |
622 | + | let cl = dp._7 | |
623 | + | let bP = dp._8 | |
624 | + | let bQ = dp._9 | |
625 | + | let bS = dp._10 | |
626 | + | let dq = valueOrElse(getInteger(au(bP)), 0) | |
627 | + | let dr = (parseIntValue(aO(br)[V]) - aY) | |
628 | + | let ds = if ((height > dq)) | |
638 | 629 | then { | |
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | makeString(["%d%d%d%d%d%d", toString( | |
630 | + | let dt = value(getInteger(aq())) | |
631 | + | let du = value(getInteger(ay(O))) | |
632 | + | let dv = value(getInteger(aw(O))) | |
633 | + | makeString(["%d%d%d%d%d%d", toString(do), toString(du), toString(dv), toString(bZ), toString(ck), toString(dt), toString(dr)], c) | |
643 | 634 | } | |
644 | - | else makeString(["%d%d%d%d%d%d", toString( | |
645 | - | $Tuple2(nil, | |
635 | + | else makeString(["%d%d%d%d%d%d", toString(do), toString(bY), toString(bW), toString(bZ), toString(ck), toString(cl), toString(dr)], c) | |
636 | + | $Tuple2(nil, ds) | |
646 | 637 | } | |
647 | 638 | ||
648 | 639 | ||
649 | - | ||
650 | - | @Callable(cp) | |
651 | - | func setManager (dv) = { | |
652 | - | let dw = co(cp) | |
653 | - | if ((dw == dw)) | |
654 | - | then { | |
655 | - | let dx = fromBase58String(dv) | |
656 | - | if ((dx == dx)) | |
657 | - | then [StringEntry(aI(), dv)] | |
658 | - | else throw("Strict value is not equal to itself.") | |
659 | - | } | |
660 | - | else throw("Strict value is not equal to itself.") | |
661 | - | } | |
662 | - | ||
663 | - | ||
664 | - | ||
665 | - | @Callable(cp) | |
666 | - | func confirmManager () = { | |
667 | - | let dy = cn() | |
668 | - | let dz = if (isDefined(dy)) | |
669 | - | then true | |
670 | - | else throw("No pending manager") | |
671 | - | if ((dz == dz)) | |
672 | - | then { | |
673 | - | let dA = if ((cp.callerPublicKey == value(dy))) | |
674 | - | then true | |
675 | - | else throw("You are not pending manager") | |
676 | - | if ((dA == dA)) | |
677 | - | then [StringEntry(aH(), toBase58String(value(dy))), DeleteEntry(aI())] | |
678 | - | else throw("Strict value is not equal to itself.") | |
679 | - | } | |
680 | - | else throw("Strict value is not equal to itself.") | |
681 | - | } | |
682 | - | ||
683 | - | ||
684 | - | @Verifier(dB) | |
685 | - | func dC () = { | |
686 | - | let dD = { | |
687 | - | let j = cl() | |
640 | + | @Verifier(dw) | |
641 | + | func dx () = { | |
642 | + | let dy = { | |
643 | + | let j = cm() | |
688 | 644 | if ($isInstanceOf(j, "ByteVector")) | |
689 | 645 | then { | |
690 | - | let | |
691 | - | | |
646 | + | let cs = j | |
647 | + | cs | |
692 | 648 | } | |
693 | 649 | else if ($isInstanceOf(j, "Unit")) | |
694 | - | then | |
650 | + | then dw.senderPublicKey | |
695 | 651 | else throw("Match error") | |
696 | 652 | } | |
697 | - | sigVerify( | |
653 | + | sigVerify(dw.bodyBytes, dw.proofs[0], dy) | |
698 | 654 | } | |
699 | 655 |
github/deemru/w8io/169f3d6 263.74 ms ◑