tx · 9Mx9R9aNdJeFJSvvdTZWcgdBHgmTEUQhBRQMw9fafGWz 3MwK6nw9HMwuKbXxu6J1rfecvePPd3JyAje: -0.02900000 Waves 2022.12.01 15:20 [2341266] smart account 3MwK6nw9HMwuKbXxu6J1rfecvePPd3JyAje > SELF 0.00000000 Waves
{ "type": 13, "id": "9Mx9R9aNdJeFJSvvdTZWcgdBHgmTEUQhBRQMw9fafGWz", "fee": 2900000, "feeAssetId": null, "timestamp": 1669897324749, "version": 1, "sender": "3MwK6nw9HMwuKbXxu6J1rfecvePPd3JyAje", "senderPublicKey": "8JB75GXEKqxmpXc6KVtT9UNqJ3BBSUZDodYD4DU7CUUB", "proofs": [ "647RE6N9t5kb85ho19YrMN1Q8eCWvHW3xLnhUidhBegu9q3UnuV7AiUBD27xAQz9kkayL5WzXGZB4WAx2WLYUPUC" ], "script": "base64:AAIFAAAAAAAAELwIAhIJCgcBAQEBAQgBEgASBAoCCAgSAwoBCBIECgIICBIECgIICBIDCgEIEgAiD2dldFN0cmluZ09yRmFpbCIDa2V5IgNTRVAiCEJVRlNDQUxFIgZzY2FsZTgiCHRocm93RXJyIgNtc2ciCGFzU3RyaW5nIgN2YWwiByRtYXRjaDAiBnZhbFN0ciIdY29udmVydFByaWNlQXNzZXRJbnRvSWRvQXNzZXQiEHByaWNlQXNzZXRBbW91bnQiDnByaWNlQXNzZXRNVUxUIgVwcmljZSIJcHJpY2VNVUxUIgxpZG9Bc3NldE1VTFQiD2JQcmljZUFzc2V0TVVMVCINYklkb0Fzc2V0TVVMVCIOYlByaWNlQXNzZXRCVUYiD2JBbW91bnRBc3NldEJVRiIOSWR4Q2ZnSWRvU3RhcnQiEUlkeENmZ0lkb0R1cmF0aW9uIhBJZHhDZmdDbGFpbVN0YXJ0IhNJZHhDZmdDbGFpbUR1cmF0aW9uIgtJZHhDZmdQcmljZSIPSWR4Q2ZnUHJpY2VNdWx0IhBJZHhDZmdJZG9Bc3NldElkIhJJZHhDZmdJZG9Bc3NldE11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mR1AAAAAAQAAAACZHYEAAAAAWoJAQAAAAJjagAAAAADCQAAAQAAAAIFAAAAAWoCAAAACkJ5dGVWZWN0b3IEAAAAAmNwBQAAAAFqBQAAAAJjcAMJAAABAAAAAgUAAAABagIAAAAEVW5pdAgFAAAAAmR0AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACZHQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJkdAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmR2GbtEdA==", "chainId": 84, "height": 2341266, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AfU4LoDdvt7rZZE3AzZTy3WypR9FzbaWWffUfbewA7Eh Next: Aqmuci6fL5PojJrf43RGNjGPNmvUYNQaiDF2kMgcfgD8 Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | let scale8 = 100000000 | |
12 | 12 | ||
13 | 13 | func throwErr (msg) = throw(makeString(["ido.ride:", msg], " ")) | |
14 | + | ||
15 | + | ||
16 | + | func asString (val) = match val { | |
17 | + | case valStr: String => | |
18 | + | valStr | |
19 | + | case _ => | |
20 | + | throw("fail to cast into String") | |
21 | + | } | |
14 | 22 | ||
15 | 23 | ||
16 | 24 | func convertPriceAssetIntoIdoAsset (priceAssetAmount,priceAssetMULT,price,priceMULT,idoAssetMULT) = { | |
168 | 176 | let newClaimedIdoAssetAmount = ((claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) + priceAssetBalancePriceAssetDecimals) | |
169 | 177 | let entries = if ((0 > newRemainingAmount)) | |
170 | 178 | then { | |
171 | - | let newLogicRemainingAmount = ((newTotalAmount - newClaimedPriceAssetAmount) - newClaimedIdoAssetAmount) | |
179 | + | let diff = ((newTotalAmount - newClaimedPriceAssetAmount) - newClaimedIdoAssetAmount) | |
180 | + | let newLogicRemainingAmount = if ((0 > diff)) | |
181 | + | then 0 | |
182 | + | else diff | |
172 | 183 | StringEntry(key, formatInvestor(newTotalAmount, newLogicRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight)) | |
173 | 184 | } | |
174 | 185 | else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight)) | |
233 | 244 | let periodLength = value(getInteger(keyPeriodLength())) | |
234 | 245 | let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0) | |
235 | 246 | let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0))) | |
236 | - | let $ | |
247 | + | let $t01279414664 = if ((currentPeriod > 0)) | |
237 | 248 | then { | |
238 | 249 | let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod))) | |
239 | 250 | let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod))) | |
240 | - | let $ | |
251 | + | let $t01305413759 = if ((height > lastPeriodEndHeight)) | |
241 | 252 | then { | |
242 | 253 | let updatedCurrentPeriod = (currentPeriod + 1) | |
243 | 254 | let periodStart = if ((height > (lastPeriodEndHeight + periodLength))) | |
252 | 263 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
253 | 264 | } | |
254 | 265 | else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight) | |
255 | - | let updatedCurrentPeriod = $ | |
256 | - | let periodStart = $ | |
257 | - | let periodEnd = $ | |
266 | + | let updatedCurrentPeriod = $t01305413759._1 | |
267 | + | let periodStart = $t01305413759._2 | |
268 | + | let periodEnd = $t01305413759._3 | |
258 | 269 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
259 | 270 | } | |
260 | 271 | else if (zeroPeriodEndHeighIsDefined) | |
261 | 272 | then { | |
262 | 273 | let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0))) | |
263 | 274 | let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0))) | |
264 | - | let $ | |
275 | + | let $t01401414396 = if ((height > zeroPeriodEndHeight)) | |
265 | 276 | then { | |
266 | 277 | let updatedCurrentPeriod = (currentPeriod + 1) | |
267 | 278 | let periodStart = (zeroPeriodEndHeight + 1) | |
269 | 280 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
270 | 281 | } | |
271 | 282 | else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight) | |
272 | - | let updatedCurrentPeriod = $ | |
273 | - | let periodStart = $ | |
274 | - | let periodEnd = $ | |
283 | + | let updatedCurrentPeriod = $t01401414396._1 | |
284 | + | let periodStart = $t01401414396._2 | |
285 | + | let periodEnd = $t01401414396._3 | |
275 | 286 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
276 | 287 | } | |
277 | 288 | else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1))) | |
278 | - | let updatedCurrentPeriod = $ | |
279 | - | let periodStart = $ | |
280 | - | let periodEnd = $ | |
289 | + | let updatedCurrentPeriod = $t01279414664._1 | |
290 | + | let periodStart = $t01279414664._2 | |
291 | + | let periodEnd = $t01279414664._3 | |
281 | 292 | let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance) | |
282 | 293 | let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance) | |
283 | 294 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
284 | 295 | let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim]) | |
285 | 296 | let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio())) | |
286 | 297 | let putOneTknV2PriceAssetAmount = scale8 | |
287 | - | let $ | |
298 | + | let $t01541915672 = { | |
288 | 299 | let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil) | |
289 | 300 | if ($isInstanceOf(@, "(Int, Int, Int)")) | |
290 | 301 | then @ | |
291 | 302 | else throw("Couldn't cast Any to (Int, Int, Int)") | |
292 | 303 | } | |
293 | - | if (($ | |
304 | + | if (($t01541915672 == $t01541915672)) | |
294 | 305 | then { | |
295 | - | let bonus = $ | |
296 | - | let feeAmount = $ | |
297 | - | let lpAmount = $ | |
306 | + | let bonus = $t01541915672._3 | |
307 | + | let feeAmount = $t01541915672._2 | |
308 | + | let lpAmount = $t01541915672._1 | |
298 | 309 | let usdtAssetId = value(getString(keyUsdtAssetId())) | |
299 | - | let $ | |
310 | + | let $t01573415952 = { | |
300 | 311 | let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil) | |
301 | 312 | if ($isInstanceOf(@, "(Int, Int)")) | |
302 | 313 | then @ | |
303 | 314 | else throw("Couldn't cast Any to (Int, Int)") | |
304 | 315 | } | |
305 | - | if (($ | |
316 | + | if (($t01573415952 == $t01573415952)) | |
306 | 317 | then { | |
307 | - | let getOneTknV2FeeAmount = $ | |
308 | - | let usdtAmount = $ | |
318 | + | let getOneTknV2FeeAmount = $t01573415952._2 | |
319 | + | let usdtAmount = $t01573415952._1 | |
309 | 320 | let currentUsdtPriceAssetRatio = fraction(putOneTknV2PriceAssetAmount, scale8, usdtAmount) | |
310 | 321 | let endPeriodBlocksLeft = (periodEnd - height) | |
311 | 322 | $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd) | |
449 | 460 | let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals | |
450 | 461 | let entries = if ((claimedAssetId58 == priceAssetId58)) | |
451 | 462 | then { | |
452 | - | let $ | |
453 | - | let periodMinAvailableToClaim = $ | |
454 | - | let periodTotalAvailableToClaim = $ | |
455 | - | let periodUserAvailableToClaim = $ | |
456 | - | let totalUserAvailableToClaim = $ | |
457 | - | let usdtPriceAssetAllowableRatio = $ | |
458 | - | let currentUsdtPriceAssetRatio = $ | |
459 | - | let endPeriodBlocksLeft = $ | |
460 | - | let updatedCurrentPeriod = $ | |
461 | - | let periodStart = $ | |
462 | - | let periodEnd = $ | |
463 | + | let $t02186122305 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
464 | + | let periodMinAvailableToClaim = $t02186122305._1 | |
465 | + | let periodTotalAvailableToClaim = $t02186122305._2 | |
466 | + | let periodUserAvailableToClaim = $t02186122305._3 | |
467 | + | let totalUserAvailableToClaim = $t02186122305._4 | |
468 | + | let usdtPriceAssetAllowableRatio = $t02186122305._5 | |
469 | + | let currentUsdtPriceAssetRatio = $t02186122305._6 | |
470 | + | let endPeriodBlocksLeft = $t02186122305._7 | |
471 | + | let updatedCurrentPeriod = $t02186122305._8 | |
472 | + | let periodStart = $t02186122305._9 | |
473 | + | let periodEnd = $t02186122305._10 | |
463 | 474 | let checks = [if ((periodUserAvailableToClaim > 0)) | |
464 | 475 | then true | |
465 | 476 | else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0)) | |
489 | 500 | } | |
490 | 501 | entries | |
491 | 502 | } | |
503 | + | } | |
504 | + | ||
505 | + | ||
506 | + | ||
507 | + | @Callable(i) | |
508 | + | func cleanRemaingAmount (userAddress58) = { | |
509 | + | let priceAssetId58 = readConfigArray()[IdxCfgPriceAssetId] | |
510 | + | let evaluateResult = split(asString(invoke(this, "claimV2READONLY", [priceAssetId58, userAddress58], nil)), SEP) | |
511 | + | if ((evaluateResult == evaluateResult)) | |
512 | + | then { | |
513 | + | let periodMinAvailableToClaim = parseIntValue(evaluateResult[2]) | |
514 | + | let check = if ((periodMinAvailableToClaim == 0)) | |
515 | + | then true | |
516 | + | else throwErr("user have unclaimed assets") | |
517 | + | if ((check == check)) | |
518 | + | then { | |
519 | + | let investor = split(value(getString(keyInvestor(userAddress58))), SEP) | |
520 | + | let investorTotalAmount = parseIntValue(investor[IdxInvTotalAmount]) | |
521 | + | let investorRemainingAmount = parseIntValue(investor[IdxInvRemainingAmount]) | |
522 | + | let investorPriceAssetBalance = parseIntValue(investor[IdxInvClaimedPriceAssetAmount]) | |
523 | + | let investorIdoAssetBalance = parseIntValue(investor[IdxInvClaimedIdoAssetAmount]) | |
524 | + | let investorLastClaimedHeight = parseIntValue(investor[IdxInvLastClaimedHeight]) | |
525 | + | let newInvestor = makeString([toString(investorTotalAmount), "0", toString(investorPriceAssetBalance), toString(investorIdoAssetBalance), toString(investorLastClaimedHeight)], SEP) | |
526 | + | let totals = split(value(getString(keyTotals())), SEP) | |
527 | + | let totalsTotalAmount = parseIntValue(totals[IdxInvTotalAmount]) | |
528 | + | let totalsRemainingAmount = parseIntValue(totals[IdxInvRemainingAmount]) | |
529 | + | let totalsClaimedPriceAssetAmount = parseIntValue(totals[IdxInvRemainingAmount]) | |
530 | + | let totalsClaimedIdoAssetAmount = parseIntValue(totals[IdxInvClaimedPriceAssetAmount]) | |
531 | + | let totalsLastClaimedHeight = parseIntValue(totals[IdxInvLastClaimedHeight]) | |
532 | + | let newTotals = makeString([toString(totalsTotalAmount), toString((totalsRemainingAmount - investorRemainingAmount)), toString(totalsClaimedPriceAssetAmount), toString(totalsClaimedIdoAssetAmount), toString(totalsLastClaimedHeight)], SEP) | |
533 | + | [StringEntry(keyInvestor(userAddress58), newInvestor), StringEntry(keyTotals(), newTotals)] | |
534 | + | } | |
535 | + | else throw("Strict value is not equal to itself.") | |
536 | + | } | |
537 | + | else throw("Strict value is not equal to itself.") | |
492 | 538 | } | |
493 | 539 | ||
494 | 540 | ||
525 | 571 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
526 | 572 | let priceAssetBalanceIdoDecimals = (priceAssetBalance * 100) | |
527 | 573 | let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceIdoDecimals) | |
528 | - | let $ | |
529 | - | let periodMinAvailableToClaim = $ | |
530 | - | let periodTotalAvailableToClaim = $ | |
531 | - | let periodUserAvailableToClaim = $ | |
532 | - | let totalUserAvailableToClaim = $ | |
533 | - | let usdtPriceAssetAllowableRatio = $ | |
534 | - | let currentUsdtPriceAssetRatio = $ | |
535 | - | let endPeriodBlocksLeft = $ | |
536 | - | let updatedCurrentPeriod = $ | |
537 | - | let periodStart = $ | |
538 | - | let periodEnd = $ | |
574 | + | let $t03058831000 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
575 | + | let periodMinAvailableToClaim = $t03058831000._1 | |
576 | + | let periodTotalAvailableToClaim = $t03058831000._2 | |
577 | + | let periodUserAvailableToClaim = $t03058831000._3 | |
578 | + | let totalUserAvailableToClaim = $t03058831000._4 | |
579 | + | let usdtPriceAssetAllowableRatio = $t03058831000._5 | |
580 | + | let currentUsdtPriceAssetRatio = $t03058831000._6 | |
581 | + | let endPeriodBlocksLeft = $t03058831000._7 | |
582 | + | let updatedCurrentPeriod = $t03058831000._8 | |
583 | + | let periodStart = $t03058831000._9 | |
584 | + | let periodEnd = $t03058831000._10 | |
539 | 585 | let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0) | |
540 | 586 | let userTotalPriceAssetClaimed = (parseIntValue(readInvestorArrayOrFail(userAddress58)[IdxInvClaimedPriceAssetAmount]) - priceAssetBalance) | |
541 | 587 | let resultString = if ((height > currentPeriodEndHeight)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | let SEP = "__" | |
8 | 8 | ||
9 | 9 | let BUFSCALE = toBigInt(1000000000000000000) | |
10 | 10 | ||
11 | 11 | let scale8 = 100000000 | |
12 | 12 | ||
13 | 13 | func throwErr (msg) = throw(makeString(["ido.ride:", msg], " ")) | |
14 | + | ||
15 | + | ||
16 | + | func asString (val) = match val { | |
17 | + | case valStr: String => | |
18 | + | valStr | |
19 | + | case _ => | |
20 | + | throw("fail to cast into String") | |
21 | + | } | |
14 | 22 | ||
15 | 23 | ||
16 | 24 | func convertPriceAssetIntoIdoAsset (priceAssetAmount,priceAssetMULT,price,priceMULT,idoAssetMULT) = { | |
17 | 25 | let bPriceAssetMULT = toBigInt(priceAssetMULT) | |
18 | 26 | let bIdoAssetMULT = toBigInt(idoAssetMULT) | |
19 | 27 | let bPriceAssetBUF = fraction(toBigInt(priceAssetAmount), BUFSCALE, bPriceAssetMULT) | |
20 | 28 | let bAmountAssetBUF = fraction(bPriceAssetBUF, toBigInt(priceMULT), toBigInt(price)) | |
21 | 29 | toInt(fraction(bAmountAssetBUF, toBigInt(idoAssetMULT), BUFSCALE)) | |
22 | 30 | } | |
23 | 31 | ||
24 | 32 | ||
25 | 33 | let IdxCfgIdoStart = 1 | |
26 | 34 | ||
27 | 35 | let IdxCfgIdoDuration = 2 | |
28 | 36 | ||
29 | 37 | let IdxCfgClaimStart = 3 | |
30 | 38 | ||
31 | 39 | let IdxCfgClaimDuration = 4 | |
32 | 40 | ||
33 | 41 | let IdxCfgPrice = 5 | |
34 | 42 | ||
35 | 43 | let IdxCfgPriceMult = 6 | |
36 | 44 | ||
37 | 45 | let IdxCfgIdoAssetId = 7 | |
38 | 46 | ||
39 | 47 | let IdxCfgIdoAssetMult = 8 | |
40 | 48 | ||
41 | 49 | let IdxCfgPriceAssetId = 9 | |
42 | 50 | ||
43 | 51 | let IdxCfgPriceAssetMult = 10 | |
44 | 52 | ||
45 | 53 | let IdxCfgMinInvestAmount = 11 | |
46 | 54 | ||
47 | 55 | func fromatConfigS (idoStart,idoDuration,claimStart,claimDuration,price,priceMult,idoAssetId58,idoAssetMult,priceAssetId58,priceAssetMult,minInvestAmount,totalIdoAssetToSell) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, totalIdoAssetToSell], SEP) | |
48 | 56 | ||
49 | 57 | ||
50 | 58 | func fromatConfig (idoStart,idoDuration,claimStart,claimDuration,price,priceMult,idoAssetId58,idoAssetMult,priceAssetId58,priceAssetMult,minInvestAmount,totalIdoAssetToSell) = fromatConfigS(toString(idoStart), toString(idoDuration), toString(claimStart), toString(claimDuration), toString(price), toString(priceMult), idoAssetId58, toString(idoAssetMult), priceAssetId58, toString(priceAssetMult), toString(minInvestAmount), toString(totalIdoAssetToSell)) | |
51 | 59 | ||
52 | 60 | ||
53 | 61 | let IdxInvTotalAmount = 1 | |
54 | 62 | ||
55 | 63 | let IdxInvRemainingAmount = 2 | |
56 | 64 | ||
57 | 65 | let IdxInvClaimedPriceAssetAmount = 3 | |
58 | 66 | ||
59 | 67 | let IdxInvClaimedIdoAssetAmount = 4 | |
60 | 68 | ||
61 | 69 | let IdxInvLastClaimedHeight = 5 | |
62 | 70 | ||
63 | 71 | func formatInvestorS (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, claimedPriceAssetAmount, claimedIdoAssetAmount, lastClaimedHeight], SEP) | |
64 | 72 | ||
65 | 73 | ||
66 | 74 | func formatInvestor (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = formatInvestorS(toString(totalAmount), toString(remainingAmount), toString(claimedPriceAssetAmount), toString(claimedIdoAssetAmount), toString(lastClaimedHeight)) | |
67 | 75 | ||
68 | 76 | ||
69 | 77 | func formatHistoryRecord (priceAssetAmount,idoAssetAmount) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(priceAssetAmount), toString(idoAssetAmount)], SEP) | |
70 | 78 | ||
71 | 79 | ||
72 | 80 | func keyConfig () = "%s__config" | |
73 | 81 | ||
74 | 82 | ||
75 | 83 | func keyInvestor (userAddress) = ("%s__" + userAddress) | |
76 | 84 | ||
77 | 85 | ||
78 | 86 | func keyTotals () = "%s__totals" | |
79 | 87 | ||
80 | 88 | ||
81 | 89 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
82 | 90 | ||
83 | 91 | ||
84 | 92 | func keyUSDNClaimDisabled () = "%s__usdnClaimDisabled" | |
85 | 93 | ||
86 | 94 | ||
87 | 95 | func keyUSDNClaimEndHeight () = "%s__usdnClaimEndHeight" | |
88 | 96 | ||
89 | 97 | ||
90 | 98 | func keyPeriodLength () = makeString(["%s", "periodLength"], SEP) | |
91 | 99 | ||
92 | 100 | ||
93 | 101 | func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP) | |
94 | 102 | ||
95 | 103 | ||
96 | 104 | func keyPeriodStartHeight (periodNum) = makeString(["%s%s", "periodStartHeight", toString(periodNum)], SEP) | |
97 | 105 | ||
98 | 106 | ||
99 | 107 | func keyPeriodEndHeight (periodNum) = makeString(["%s%s", "periodEndHeight", toString(periodNum)], SEP) | |
100 | 108 | ||
101 | 109 | ||
102 | 110 | func keyUsdtPriceAssetAllowableRatio () = makeString(["%s", "usdtPriceAssetAllowableRatio"], SEP) | |
103 | 111 | ||
104 | 112 | ||
105 | 113 | func keyTotalPeriodAllowance (assetId) = makeString(["%s%s", "totalPeriodAllowance", assetId], SEP) | |
106 | 114 | ||
107 | 115 | ||
108 | 116 | func keyUserPeriodAllowance (assetId) = makeString(["%s%s", "userPeriodAllowance", assetId], SEP) | |
109 | 117 | ||
110 | 118 | ||
111 | 119 | func keyPeriodTotalAvailableToClaim (assetId,periodNum) = makeString(["%s%s%s", "periodTotalAvailableToClaim", assetId, toString(periodNum)], SEP) | |
112 | 120 | ||
113 | 121 | ||
114 | 122 | func keyPeriodUserAvailableToClaim (assetId,periodNum,userAddress) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", assetId, toString(periodNum), userAddress], SEP) | |
115 | 123 | ||
116 | 124 | ||
117 | 125 | func keyUsdtPriceAssetStablePool () = makeString(["%s", "usdtPriceAssetStablePool"], SEP) | |
118 | 126 | ||
119 | 127 | ||
120 | 128 | func keyUsdtAssetId () = makeString(["%s", "usdtAssetId"], SEP) | |
121 | 129 | ||
122 | 130 | ||
123 | 131 | func keyPriceAssetBalance (address) = makeString(["%s%s", "priceAssetBalance", address], SEP) | |
124 | 132 | ||
125 | 133 | ||
126 | 134 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
127 | 135 | ||
128 | 136 | ||
129 | 137 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
130 | 138 | ||
131 | 139 | ||
132 | 140 | func readConfigArray () = split(getStringOrFail(keyConfig()), SEP) | |
133 | 141 | ||
134 | 142 | ||
135 | 143 | func readTotalsArrayOrDefaultByCustomKey (customKey) = split(valueOrElse(getString(customKey), formatInvestorS("0", "0", "0", "0", "0")), SEP) | |
136 | 144 | ||
137 | 145 | ||
138 | 146 | func readTotalsArrayOrDefault () = readTotalsArrayOrDefaultByCustomKey(keyTotals()) | |
139 | 147 | ||
140 | 148 | ||
141 | 149 | func readInvestorArrayOrDefault (userAddress) = readTotalsArrayOrDefaultByCustomKey(keyInvestor(userAddress)) | |
142 | 150 | ||
143 | 151 | ||
144 | 152 | func readInvestorArrayOrFail (userAddress) = split(getStringOrFail(keyInvestor(userAddress)), SEP) | |
145 | 153 | ||
146 | 154 | ||
147 | 155 | let IdxDiffTotalIncrement = 0 | |
148 | 156 | ||
149 | 157 | let IdxDiffRemainingPriceAmountIncrement = 1 | |
150 | 158 | ||
151 | 159 | let IdxDiffClaimedPriceAmountIncrement = 2 | |
152 | 160 | ||
153 | 161 | let IdxDiffClaimedIdoAssetAmountIncrement = 3 | |
154 | 162 | ||
155 | 163 | func TotalsEntry (key,origArray,incrementDiff,newLastClaimedHeight,priceAssetBalance) = { | |
156 | 164 | let totalAmount = parseIntValue(origArray[IdxInvTotalAmount]) | |
157 | 165 | let remainingAmount = parseIntValue(origArray[IdxInvRemainingAmount]) | |
158 | 166 | let claimedPriceAssetAmount = parseIntValue(origArray[IdxInvClaimedPriceAssetAmount]) | |
159 | 167 | let claimedIdoAssetAmount = parseIntValue(origArray[IdxInvClaimedIdoAssetAmount]) | |
160 | 168 | let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight]) | |
161 | 169 | let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement]) | |
162 | 170 | let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement]) | |
163 | 171 | let cfgArray = readConfigArray() | |
164 | 172 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
165 | 173 | let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals | |
166 | 174 | let priceAssetBalancePriceAssetDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN)) | |
167 | 175 | let newClaimedPriceAssetAmount = ((claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement]) - priceAssetBalance) | |
168 | 176 | let newClaimedIdoAssetAmount = ((claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) + priceAssetBalancePriceAssetDecimals) | |
169 | 177 | let entries = if ((0 > newRemainingAmount)) | |
170 | 178 | then { | |
171 | - | let newLogicRemainingAmount = ((newTotalAmount - newClaimedPriceAssetAmount) - newClaimedIdoAssetAmount) | |
179 | + | let diff = ((newTotalAmount - newClaimedPriceAssetAmount) - newClaimedIdoAssetAmount) | |
180 | + | let newLogicRemainingAmount = if ((0 > diff)) | |
181 | + | then 0 | |
182 | + | else diff | |
172 | 183 | StringEntry(key, formatInvestor(newTotalAmount, newLogicRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight)) | |
173 | 184 | } | |
174 | 185 | else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight)) | |
175 | 186 | entries | |
176 | 187 | } | |
177 | 188 | ||
178 | 189 | ||
179 | 190 | func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount)) | |
180 | 191 | ||
181 | 192 | ||
182 | 193 | func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount)) | |
183 | 194 | ||
184 | 195 | ||
185 | 196 | func internalClaim (claimedAssetId58,userAddress,txId) = { | |
186 | 197 | let cfgArray = readConfigArray() | |
187 | 198 | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
188 | 199 | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
189 | 200 | let claimEnd = (claimStart + claimDuration) | |
190 | 201 | let price = parseIntValue(cfgArray[IdxCfgPrice]) | |
191 | 202 | let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult]) | |
192 | 203 | let idoAssetId58 = cfgArray[IdxCfgIdoAssetId] | |
193 | 204 | let idoAssetId = fromBase58String(idoAssetId58) | |
194 | 205 | let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult]) | |
195 | 206 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
196 | 207 | let priceAssetId = fromBase58String(priceAssetId58) | |
197 | 208 | let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult]) | |
198 | 209 | let userAddress58 = toString(userAddress) | |
199 | 210 | let origInvestArray = readInvestorArrayOrFail(userAddress58) | |
200 | 211 | let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount]) | |
201 | 212 | let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight]) | |
202 | 213 | let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP)) | |
203 | 214 | then claimStart | |
204 | 215 | else investLastClaimedHeightTMP | |
205 | 216 | let newClaimPeriodHeight = if ((height > claimEnd)) | |
206 | 217 | then claimEnd | |
207 | 218 | else if ((claimStart > height)) | |
208 | 219 | then claimStart | |
209 | 220 | else height | |
210 | 221 | let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight) | |
211 | 222 | let claimingPriceAssetAmount = fraction(investTotalAmount, claimingBlocks, claimDuration) | |
212 | 223 | let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult) | |
213 | 224 | let isUSDN = (claimedAssetId58 == priceAssetId58) | |
214 | 225 | let isUSDNClaimDisabled = valueOrElse(getBoolean(keyUSDNClaimDisabled()), false) | |
215 | 226 | let checks = [if (!(if (isUSDN) | |
216 | 227 | then isUSDNClaimDisabled | |
217 | 228 | else false)) | |
218 | 229 | then true | |
219 | 230 | else throw("USDN claim is disabled")] | |
220 | 231 | if ((checks == checks)) | |
221 | 232 | then if ((claimedAssetId58 == priceAssetId58)) | |
222 | 233 | then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount]) | |
223 | 234 | else if ((claimedAssetId58 == idoAssetId58)) | |
224 | 235 | then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount]) | |
225 | 236 | else throw(("unsupported assetId: " + claimedAssetId58)) | |
226 | 237 | else throw("Strict value is not equal to itself.") | |
227 | 238 | } | |
228 | 239 | ||
229 | 240 | ||
230 | 241 | func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = { | |
231 | 242 | let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58))) | |
232 | 243 | let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58))) | |
233 | 244 | let periodLength = value(getInteger(keyPeriodLength())) | |
234 | 245 | let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0) | |
235 | 246 | let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0))) | |
236 | - | let $ | |
247 | + | let $t01279414664 = if ((currentPeriod > 0)) | |
237 | 248 | then { | |
238 | 249 | let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod))) | |
239 | 250 | let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod))) | |
240 | - | let $ | |
251 | + | let $t01305413759 = if ((height > lastPeriodEndHeight)) | |
241 | 252 | then { | |
242 | 253 | let updatedCurrentPeriod = (currentPeriod + 1) | |
243 | 254 | let periodStart = if ((height > (lastPeriodEndHeight + periodLength))) | |
244 | 255 | then { | |
245 | 256 | let blocksToLastPeriodStart = ((height - lastPeriodEndHeight) % periodLength) | |
246 | 257 | if ((blocksToLastPeriodStart == 0)) | |
247 | 258 | then ((height - periodLength) + 1) | |
248 | 259 | else (height - blocksToLastPeriodStart) | |
249 | 260 | } | |
250 | 261 | else (lastPeriodEndHeight + 1) | |
251 | 262 | let periodEnd = ((periodStart + periodLength) - 1) | |
252 | 263 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
253 | 264 | } | |
254 | 265 | else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight) | |
255 | - | let updatedCurrentPeriod = $ | |
256 | - | let periodStart = $ | |
257 | - | let periodEnd = $ | |
266 | + | let updatedCurrentPeriod = $t01305413759._1 | |
267 | + | let periodStart = $t01305413759._2 | |
268 | + | let periodEnd = $t01305413759._3 | |
258 | 269 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
259 | 270 | } | |
260 | 271 | else if (zeroPeriodEndHeighIsDefined) | |
261 | 272 | then { | |
262 | 273 | let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0))) | |
263 | 274 | let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0))) | |
264 | - | let $ | |
275 | + | let $t01401414396 = if ((height > zeroPeriodEndHeight)) | |
265 | 276 | then { | |
266 | 277 | let updatedCurrentPeriod = (currentPeriod + 1) | |
267 | 278 | let periodStart = (zeroPeriodEndHeight + 1) | |
268 | 279 | let periodEnd = ((periodStart + periodLength) - 1) | |
269 | 280 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
270 | 281 | } | |
271 | 282 | else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight) | |
272 | - | let updatedCurrentPeriod = $ | |
273 | - | let periodStart = $ | |
274 | - | let periodEnd = $ | |
283 | + | let updatedCurrentPeriod = $t01401414396._1 | |
284 | + | let periodStart = $t01401414396._2 | |
285 | + | let periodEnd = $t01401414396._3 | |
275 | 286 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
276 | 287 | } | |
277 | 288 | else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1))) | |
278 | - | let updatedCurrentPeriod = $ | |
279 | - | let periodStart = $ | |
280 | - | let periodEnd = $ | |
289 | + | let updatedCurrentPeriod = $t01279414664._1 | |
290 | + | let periodStart = $t01279414664._2 | |
291 | + | let periodEnd = $t01279414664._3 | |
281 | 292 | let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance) | |
282 | 293 | let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance) | |
283 | 294 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
284 | 295 | let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim]) | |
285 | 296 | let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio())) | |
286 | 297 | let putOneTknV2PriceAssetAmount = scale8 | |
287 | - | let $ | |
298 | + | let $t01541915672 = { | |
288 | 299 | let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil) | |
289 | 300 | if ($isInstanceOf(@, "(Int, Int, Int)")) | |
290 | 301 | then @ | |
291 | 302 | else throw("Couldn't cast Any to (Int, Int, Int)") | |
292 | 303 | } | |
293 | - | if (($ | |
304 | + | if (($t01541915672 == $t01541915672)) | |
294 | 305 | then { | |
295 | - | let bonus = $ | |
296 | - | let feeAmount = $ | |
297 | - | let lpAmount = $ | |
306 | + | let bonus = $t01541915672._3 | |
307 | + | let feeAmount = $t01541915672._2 | |
308 | + | let lpAmount = $t01541915672._1 | |
298 | 309 | let usdtAssetId = value(getString(keyUsdtAssetId())) | |
299 | - | let $ | |
310 | + | let $t01573415952 = { | |
300 | 311 | let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil) | |
301 | 312 | if ($isInstanceOf(@, "(Int, Int)")) | |
302 | 313 | then @ | |
303 | 314 | else throw("Couldn't cast Any to (Int, Int)") | |
304 | 315 | } | |
305 | - | if (($ | |
316 | + | if (($t01573415952 == $t01573415952)) | |
306 | 317 | then { | |
307 | - | let getOneTknV2FeeAmount = $ | |
308 | - | let usdtAmount = $ | |
318 | + | let getOneTknV2FeeAmount = $t01573415952._2 | |
319 | + | let usdtAmount = $t01573415952._1 | |
309 | 320 | let currentUsdtPriceAssetRatio = fraction(putOneTknV2PriceAssetAmount, scale8, usdtAmount) | |
310 | 321 | let endPeriodBlocksLeft = (periodEnd - height) | |
311 | 322 | $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd) | |
312 | 323 | } | |
313 | 324 | else throw("Strict value is not equal to itself.") | |
314 | 325 | } | |
315 | 326 | else throw("Strict value is not equal to itself.") | |
316 | 327 | } | |
317 | 328 | ||
318 | 329 | ||
319 | 330 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
320 | 331 | case s: String => | |
321 | 332 | fromBase58String(s) | |
322 | 333 | case _: Unit => | |
323 | 334 | unit | |
324 | 335 | case _ => | |
325 | 336 | throw("Match error") | |
326 | 337 | } | |
327 | 338 | ||
328 | 339 | ||
329 | 340 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
330 | 341 | case s: String => | |
331 | 342 | fromBase58String(s) | |
332 | 343 | case _: Unit => | |
333 | 344 | unit | |
334 | 345 | case _ => | |
335 | 346 | throw("Match error") | |
336 | 347 | } | |
337 | 348 | ||
338 | 349 | ||
339 | 350 | func mustManager (i) = { | |
340 | 351 | let pd = throw("Permission denied") | |
341 | 352 | match managerPublicKeyOrUnit() { | |
342 | 353 | case pk: ByteVector => | |
343 | 354 | if ((i.callerPublicKey == pk)) | |
344 | 355 | then true | |
345 | 356 | else pd | |
346 | 357 | case _: Unit => | |
347 | 358 | if ((i.caller == this)) | |
348 | 359 | then true | |
349 | 360 | else pd | |
350 | 361 | case _ => | |
351 | 362 | throw("Match error") | |
352 | 363 | } | |
353 | 364 | } | |
354 | 365 | ||
355 | 366 | ||
356 | 367 | @Callable(i) | |
357 | 368 | func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = { | |
358 | 369 | let priceMult = ((100 * 1000) * 1000) | |
359 | 370 | let idoEnd = (idoStart + idoDuration) | |
360 | 371 | if (isDefined(getString(keyConfig()))) | |
361 | 372 | then throw("already initialized") | |
362 | 373 | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller))) | |
363 | 374 | then throw("not authorized") | |
364 | 375 | else if ((size(i.payments) != 1)) | |
365 | 376 | then throw("exactly 1 payment must be attached") | |
366 | 377 | else if ((idoEnd >= claimStart)) | |
367 | 378 | then throw("claimStart must be greater than idoEnd") | |
368 | 379 | else { | |
369 | 380 | let pmt = value(i.payments[0]) | |
370 | 381 | let idoAssetId = value(pmt.assetId) | |
371 | 382 | let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info") | |
372 | 383 | let idoAssetId58 = toBase58String(idoAssetId) | |
373 | 384 | let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN) | |
374 | 385 | let priceAssetId = fromBase58String(priceAssetId58) | |
375 | 386 | let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info") | |
376 | 387 | let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN) | |
377 | 388 | let origTotalsArray = readTotalsArrayOrDefault() | |
378 | 389 | let totalsDiff = [0, 0, 0, 0] | |
379 | 390 | [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart, 0)] | |
380 | 391 | } | |
381 | 392 | } | |
382 | 393 | ||
383 | 394 | ||
384 | 395 | ||
385 | 396 | @Callable(i) | |
386 | 397 | func invest () = { | |
387 | 398 | let cfgArray = readConfigArray() | |
388 | 399 | let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart]) | |
389 | 400 | let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration]) | |
390 | 401 | let idoEnd = (idoStart + idoDuration) | |
391 | 402 | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
392 | 403 | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
393 | 404 | let price = parseIntValue(cfgArray[IdxCfgPrice]) | |
394 | 405 | let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult]) | |
395 | 406 | let idoAssetId58 = cfgArray[IdxCfgIdoAssetId] | |
396 | 407 | let idoAssetId = fromBase58String(idoAssetId58) | |
397 | 408 | let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult]) | |
398 | 409 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
399 | 410 | let priceAssetId = fromBase58String(priceAssetId58) | |
400 | 411 | let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult]) | |
401 | 412 | let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount]) | |
402 | 413 | let userAddress = toString(i.caller) | |
403 | 414 | if ((idoStart > height)) | |
404 | 415 | then throw("ido has not been started yet") | |
405 | 416 | else if ((height > idoEnd)) | |
406 | 417 | then throw("ido has been already ended") | |
407 | 418 | else if ((size(i.payments) != 1)) | |
408 | 419 | then throw("exactly 1 payment is expected") | |
409 | 420 | else { | |
410 | 421 | let pmt = value(i.payments[0]) | |
411 | 422 | let pmtAssetId = value(pmt.assetId) | |
412 | 423 | let pmtAmount = pmt.amount | |
413 | 424 | if ((pmtAssetId != priceAssetId)) | |
414 | 425 | then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected")) | |
415 | 426 | else { | |
416 | 427 | let origInvestorArray = readInvestorArrayOrDefault(userAddress) | |
417 | 428 | let origTotalsArray = readTotalsArrayOrDefault() | |
418 | 429 | let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount) | |
419 | 430 | let requiredIdoAssetAmount = (newPriceTotalAmount * 100) | |
420 | 431 | if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId))) | |
421 | 432 | then throw("IDO asset has been - sold consider to use smaller payment") | |
422 | 433 | else { | |
423 | 434 | let totalsDiff = [pmtAmount, pmtAmount, 0, 0] | |
424 | 435 | [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart, 0), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart, 0), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)] | |
425 | 436 | } | |
426 | 437 | } | |
427 | 438 | } | |
428 | 439 | } | |
429 | 440 | ||
430 | 441 | ||
431 | 442 | ||
432 | 443 | @Callable(i) | |
433 | 444 | func claim (claimedAssetId58,userAddress58) = { | |
434 | 445 | let callerAddress58 = toString(i.caller) | |
435 | 446 | if ((userAddress58 != callerAddress58)) | |
436 | 447 | then throw("not authorized") | |
437 | 448 | else { | |
438 | 449 | let cfgArray = readConfigArray() | |
439 | 450 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
440 | 451 | let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId) | |
441 | 452 | let totalsDiff = claimResultTuple._1 | |
442 | 453 | let outAmount = claimResultTuple._2 | |
443 | 454 | let outAssetId = claimResultTuple._3 | |
444 | 455 | let origInvestArray = claimResultTuple._4 | |
445 | 456 | let newClaimPeriodHeight = claimResultTuple._5 | |
446 | 457 | let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement] | |
447 | 458 | let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement] | |
448 | 459 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
449 | 460 | let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals | |
450 | 461 | let entries = if ((claimedAssetId58 == priceAssetId58)) | |
451 | 462 | then { | |
452 | - | let $ | |
453 | - | let periodMinAvailableToClaim = $ | |
454 | - | let periodTotalAvailableToClaim = $ | |
455 | - | let periodUserAvailableToClaim = $ | |
456 | - | let totalUserAvailableToClaim = $ | |
457 | - | let usdtPriceAssetAllowableRatio = $ | |
458 | - | let currentUsdtPriceAssetRatio = $ | |
459 | - | let endPeriodBlocksLeft = $ | |
460 | - | let updatedCurrentPeriod = $ | |
461 | - | let periodStart = $ | |
462 | - | let periodEnd = $ | |
463 | + | let $t02186122305 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
464 | + | let periodMinAvailableToClaim = $t02186122305._1 | |
465 | + | let periodTotalAvailableToClaim = $t02186122305._2 | |
466 | + | let periodUserAvailableToClaim = $t02186122305._3 | |
467 | + | let totalUserAvailableToClaim = $t02186122305._4 | |
468 | + | let usdtPriceAssetAllowableRatio = $t02186122305._5 | |
469 | + | let currentUsdtPriceAssetRatio = $t02186122305._6 | |
470 | + | let endPeriodBlocksLeft = $t02186122305._7 | |
471 | + | let updatedCurrentPeriod = $t02186122305._8 | |
472 | + | let periodStart = $t02186122305._9 | |
473 | + | let periodEnd = $t02186122305._10 | |
463 | 474 | let checks = [if ((periodUserAvailableToClaim > 0)) | |
464 | 475 | then true | |
465 | 476 | else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0)) | |
466 | 477 | then true | |
467 | 478 | else throwErr("unavailable to claim because total period allowance reached"), if ((periodMinAvailableToClaim > 0)) | |
468 | 479 | then true | |
469 | 480 | else throwErr("nothing to claim"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio)) | |
470 | 481 | then true | |
471 | 482 | else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")] | |
472 | 483 | if ((checks == checks)) | |
473 | 484 | then { | |
474 | 485 | let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim) | |
475 | 486 | let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim) | |
476 | 487 | let entries = if ((priceAssetBalance >= periodMinAvailableToClaim)) | |
477 | 488 | then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))] | |
478 | 489 | else { | |
479 | 490 | let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim) | |
480 | 491 | [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, 0), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, 0), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)] | |
481 | 492 | } | |
482 | 493 | $Tuple2(([IntegerEntry(keyCurrentPeriod(), updatedCurrentPeriod), IntegerEntry(keyPeriodStartHeight(updatedCurrentPeriod), periodStart), IntegerEntry(keyPeriodEndHeight(updatedCurrentPeriod), periodEnd), IntegerEntry(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod), updatedPeriodTotalAvailableToClaim), IntegerEntry(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58), updatedPeriodUserAvailableToClaim), ClaimOperationHistoryEntry(userAddress58, periodMinAvailableToClaim, claimedIdoAssetAmountFromDiff, i.transactionId)] ++ entries), unit) | |
483 | 494 | } | |
484 | 495 | else throw("Strict value is not equal to itself.") | |
485 | 496 | } | |
486 | 497 | else { | |
487 | 498 | let priceAssetBalanceIdoDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN)) | |
488 | 499 | $Tuple2([ScriptTransfer(i.caller, (outAmount + priceAssetBalanceIdoDecimals), outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), 0), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, priceAssetBalance), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, (claimedIdoAssetAmountFromDiff + priceAssetBalanceIdoDecimals), i.transactionId)], unit) | |
489 | 500 | } | |
490 | 501 | entries | |
491 | 502 | } | |
503 | + | } | |
504 | + | ||
505 | + | ||
506 | + | ||
507 | + | @Callable(i) | |
508 | + | func cleanRemaingAmount (userAddress58) = { | |
509 | + | let priceAssetId58 = readConfigArray()[IdxCfgPriceAssetId] | |
510 | + | let evaluateResult = split(asString(invoke(this, "claimV2READONLY", [priceAssetId58, userAddress58], nil)), SEP) | |
511 | + | if ((evaluateResult == evaluateResult)) | |
512 | + | then { | |
513 | + | let periodMinAvailableToClaim = parseIntValue(evaluateResult[2]) | |
514 | + | let check = if ((periodMinAvailableToClaim == 0)) | |
515 | + | then true | |
516 | + | else throwErr("user have unclaimed assets") | |
517 | + | if ((check == check)) | |
518 | + | then { | |
519 | + | let investor = split(value(getString(keyInvestor(userAddress58))), SEP) | |
520 | + | let investorTotalAmount = parseIntValue(investor[IdxInvTotalAmount]) | |
521 | + | let investorRemainingAmount = parseIntValue(investor[IdxInvRemainingAmount]) | |
522 | + | let investorPriceAssetBalance = parseIntValue(investor[IdxInvClaimedPriceAssetAmount]) | |
523 | + | let investorIdoAssetBalance = parseIntValue(investor[IdxInvClaimedIdoAssetAmount]) | |
524 | + | let investorLastClaimedHeight = parseIntValue(investor[IdxInvLastClaimedHeight]) | |
525 | + | let newInvestor = makeString([toString(investorTotalAmount), "0", toString(investorPriceAssetBalance), toString(investorIdoAssetBalance), toString(investorLastClaimedHeight)], SEP) | |
526 | + | let totals = split(value(getString(keyTotals())), SEP) | |
527 | + | let totalsTotalAmount = parseIntValue(totals[IdxInvTotalAmount]) | |
528 | + | let totalsRemainingAmount = parseIntValue(totals[IdxInvRemainingAmount]) | |
529 | + | let totalsClaimedPriceAssetAmount = parseIntValue(totals[IdxInvRemainingAmount]) | |
530 | + | let totalsClaimedIdoAssetAmount = parseIntValue(totals[IdxInvClaimedPriceAssetAmount]) | |
531 | + | let totalsLastClaimedHeight = parseIntValue(totals[IdxInvLastClaimedHeight]) | |
532 | + | let newTotals = makeString([toString(totalsTotalAmount), toString((totalsRemainingAmount - investorRemainingAmount)), toString(totalsClaimedPriceAssetAmount), toString(totalsClaimedIdoAssetAmount), toString(totalsLastClaimedHeight)], SEP) | |
533 | + | [StringEntry(keyInvestor(userAddress58), newInvestor), StringEntry(keyTotals(), newTotals)] | |
534 | + | } | |
535 | + | else throw("Strict value is not equal to itself.") | |
536 | + | } | |
537 | + | else throw("Strict value is not equal to itself.") | |
492 | 538 | } | |
493 | 539 | ||
494 | 540 | ||
495 | 541 | ||
496 | 542 | @Callable(i) | |
497 | 543 | func claimREADONLY (claimedAssetId58,userAddress58) = { | |
498 | 544 | let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String("")) | |
499 | 545 | let totalsDiff = claimResultTuple._1 | |
500 | 546 | let outAmount = claimResultTuple._2 | |
501 | 547 | let outAssetId = claimResultTuple._3 | |
502 | 548 | let origInvestArray = claimResultTuple._4 | |
503 | 549 | let newClaimPeriodHeight = claimResultTuple._5 | |
504 | 550 | let availableToClaimArray = claimResultTuple._6 | |
505 | 551 | let availablePriceAmountToClaim = availableToClaimArray[0] | |
506 | 552 | let availableIdoAmountToClaim = availableToClaimArray[1] | |
507 | 553 | $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP)) | |
508 | 554 | } | |
509 | 555 | ||
510 | 556 | ||
511 | 557 | ||
512 | 558 | @Callable(i) | |
513 | 559 | func claimV2READONLY (claimedAssetId58,userAddress58) = { | |
514 | 560 | let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String("")) | |
515 | 561 | let totalsDiff = claimResultTuple._1 | |
516 | 562 | let outAmount = claimResultTuple._2 | |
517 | 563 | let outAssetId = claimResultTuple._3 | |
518 | 564 | let origInvestArray = claimResultTuple._4 | |
519 | 565 | let newClaimPeriodHeight = claimResultTuple._5 | |
520 | 566 | let availableToClaimArray = claimResultTuple._6 | |
521 | 567 | let availablePriceAmountToClaim = availableToClaimArray[0] | |
522 | 568 | let availableIdoAmountToClaim = availableToClaimArray[1] | |
523 | 569 | let cfgArray = readConfigArray() | |
524 | 570 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
525 | 571 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
526 | 572 | let priceAssetBalanceIdoDecimals = (priceAssetBalance * 100) | |
527 | 573 | let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceIdoDecimals) | |
528 | - | let $ | |
529 | - | let periodMinAvailableToClaim = $ | |
530 | - | let periodTotalAvailableToClaim = $ | |
531 | - | let periodUserAvailableToClaim = $ | |
532 | - | let totalUserAvailableToClaim = $ | |
533 | - | let usdtPriceAssetAllowableRatio = $ | |
534 | - | let currentUsdtPriceAssetRatio = $ | |
535 | - | let endPeriodBlocksLeft = $ | |
536 | - | let updatedCurrentPeriod = $ | |
537 | - | let periodStart = $ | |
538 | - | let periodEnd = $ | |
574 | + | let $t03058831000 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
575 | + | let periodMinAvailableToClaim = $t03058831000._1 | |
576 | + | let periodTotalAvailableToClaim = $t03058831000._2 | |
577 | + | let periodUserAvailableToClaim = $t03058831000._3 | |
578 | + | let totalUserAvailableToClaim = $t03058831000._4 | |
579 | + | let usdtPriceAssetAllowableRatio = $t03058831000._5 | |
580 | + | let currentUsdtPriceAssetRatio = $t03058831000._6 | |
581 | + | let endPeriodBlocksLeft = $t03058831000._7 | |
582 | + | let updatedCurrentPeriod = $t03058831000._8 | |
583 | + | let periodStart = $t03058831000._9 | |
584 | + | let periodEnd = $t03058831000._10 | |
539 | 585 | let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0) | |
540 | 586 | let userTotalPriceAssetClaimed = (parseIntValue(readInvestorArrayOrFail(userAddress58)[IdxInvClaimedPriceAssetAmount]) - priceAssetBalance) | |
541 | 587 | let resultString = if ((height > currentPeriodEndHeight)) | |
542 | 588 | then { | |
543 | 589 | let periodLenght = value(getInteger(keyPeriodLength())) | |
544 | 590 | let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58))) | |
545 | 591 | let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58))) | |
546 | 592 | makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght), toString(userTotalPriceAssetClaimed)], SEP) | |
547 | 593 | } | |
548 | 594 | else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft), toString(userTotalPriceAssetClaimed)], SEP) | |
549 | 595 | $Tuple2(nil, resultString) | |
550 | 596 | } | |
551 | 597 | ||
552 | 598 | ||
553 | 599 | ||
554 | 600 | @Callable(i) | |
555 | 601 | func setManager (pendingManagerPublicKey) = { | |
556 | 602 | let checkCaller = mustManager(i) | |
557 | 603 | if ((checkCaller == checkCaller)) | |
558 | 604 | then { | |
559 | 605 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
560 | 606 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
561 | 607 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
562 | 608 | else throw("Strict value is not equal to itself.") | |
563 | 609 | } | |
564 | 610 | else throw("Strict value is not equal to itself.") | |
565 | 611 | } | |
566 | 612 | ||
567 | 613 | ||
568 | 614 | ||
569 | 615 | @Callable(i) | |
570 | 616 | func confirmManager () = { | |
571 | 617 | let pm = pendingManagerPublicKeyOrUnit() | |
572 | 618 | let hasPM = if (isDefined(pm)) | |
573 | 619 | then true | |
574 | 620 | else throw("No pending manager") | |
575 | 621 | if ((hasPM == hasPM)) | |
576 | 622 | then { | |
577 | 623 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
578 | 624 | then true | |
579 | 625 | else throw("You are not pending manager") | |
580 | 626 | if ((checkPM == checkPM)) | |
581 | 627 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
582 | 628 | else throw("Strict value is not equal to itself.") | |
583 | 629 | } | |
584 | 630 | else throw("Strict value is not equal to itself.") | |
585 | 631 | } | |
586 | 632 | ||
587 | 633 | ||
588 | 634 | @Verifier(tx) | |
589 | 635 | func verify () = { | |
590 | 636 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
591 | 637 | case pk: ByteVector => | |
592 | 638 | pk | |
593 | 639 | case _: Unit => | |
594 | 640 | tx.senderPublicKey | |
595 | 641 | case _ => | |
596 | 642 | throw("Match error") | |
597 | 643 | } | |
598 | 644 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
599 | 645 | } | |
600 | 646 |
github/deemru/w8io/026f985 83.84 ms ◑