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