tx · 4n6yTmzMnEm5ByB9j4BetivgvTrVfK8RbpGCJ8CEPYuT

3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv:  -0.02600000 Waves

2022.11.03 10:09 [2300608] smart account 3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv > SELF 0.00000000 Waves

{ "type": 13, "id": "4n6yTmzMnEm5ByB9j4BetivgvTrVfK8RbpGCJ8CEPYuT", "fee": 2600000, "feeAssetId": null, "timestamp": 1667459427822, "version": 1, "sender": "3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv", "senderPublicKey": "39YkRD2qWXTcdNBr4CbDnm8g8SAB2FKVaDeGYahcFHHx", "proofs": [ "2KrB5n3kfezcsGhvfTq6xErRxFyJnRwdwTZjqGGvxvra7z4BGAiY29VBvGEJmvLWhQLgpeU9Nd17j1Pb7Rjb8soa" ], "script": "base64:AAIFAAAAAAAADqEIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZm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AAAAJjUgMJAQAAAAlpc0RlZmluZWQAAAABBQAAAAJjUQYJAAACAAAAAQIAAAASTm8gcGVuZGluZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAJjUgUAAAACY1IEAAAAAmNTAwkAAAAAAAACCAUAAAACY2YAAAAPY2FsbGVyUHVibGljS2V5CQEAAAAFdmFsdWUAAAABBQAAAAJjUQYJAAACAAAAAQIAAAAbWW91IGFyZSBub3QgcGVuZGluZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAJjUwUAAAACY1MJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAAAmFCAAAAAAkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAJjUQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAACYUMAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACY1QBAAAAAmNVAAAAAAQAAAACY1YEAAAAAmNiCQEAAAACY2EAAAAAAwkAAAEAAAACBQAAAAJjYgIAAAAKQnl0ZVZlY3RvcgQAAAACY2gFAAAAAmNiBQAAAAJjaAMJAAABAAAAAgUAAAACY2ICAAAABFVuaXQIBQAAAAJjVAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmNUAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACY1QAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJjVnI8ED0=", "chainId": 84, "height": 2300608, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HfgW1eUAcygZBBWAFJ7YDE5gu44KCN8qU1NQB7AVn8US Next: HN7B3HuHn2T2PzXVLi4FJhMY2Qi5VWZWTKZAjFh2MBRq Diff:
OldNewDifferences
225225 let periodLength = value(getInteger(keyPeriodLength()))
226226 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
227227 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
228- let $t01183513421 = if ((currentPeriod > 0))
228+ let $t01183513714 = if ((currentPeriod > 0))
229229 then {
230230 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1))))
231231 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1))))
232- let $t01210312516 = if ((height > lastPeriodEndHeight))
232+ let $t01210312809 = if ((height > lastPeriodEndHeight))
233233 then {
234234 let updatedCurrentPeriod = (currentPeriod + 1)
235- let periodStart = (height - ((height - lastPeriodEndHeight) % periodLength))
235+ let periodStart = if ((height > (lastPeriodEndHeight + periodLength)))
236+ then {
237+ let blocksToLastPeriodStart = ((height - lastPeriodEndHeight) % periodLength)
238+ if ((blocksToLastPeriodStart == 0))
239+ then ((height - periodLength) + 1)
240+ else (height - blocksToLastPeriodStart)
241+ }
242+ else (lastPeriodEndHeight + 1)
236243 let periodEnd = ((periodStart + periodLength) - 1)
237244 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
238245 }
239246 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
240- let updatedCurrentPeriod = $t01210312516._1
241- let periodStart = $t01210312516._2
242- let periodEnd = $t01210312516._3
247+ let updatedCurrentPeriod = $t01210312809._1
248+ let periodStart = $t01210312809._2
249+ let periodEnd = $t01210312809._3
243250 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
244251 }
245252 else if (zeroPeriodEndHeighIsDefined)
246253 then {
247254 let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
248255 let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
249- let $t01277113153 = if ((height > zeroPeriodEndHeight))
256+ let $t01306413446 = if ((height > zeroPeriodEndHeight))
250257 then {
251258 let updatedCurrentPeriod = (currentPeriod + 1)
252259 let periodStart = (zeroPeriodEndHeight + 1)
254261 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
255262 }
256263 else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
257- let updatedCurrentPeriod = $t01277113153._1
258- let periodStart = $t01277113153._2
259- let periodEnd = $t01277113153._3
264+ let updatedCurrentPeriod = $t01306413446._1
265+ let periodStart = $t01306413446._2
266+ let periodEnd = $t01306413446._3
260267 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
261268 }
262269 else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
263- let updatedCurrentPeriod = $t01183513421._1
264- let periodStart = $t01183513421._2
265- let periodEnd = $t01183513421._3
270+ let updatedCurrentPeriod = $t01183513714._1
271+ let periodStart = $t01183513714._2
272+ let periodEnd = $t01183513714._3
266273 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
267274 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
268275 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
269276 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
270277 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
271278 let putOneTknV2PriceAssetAmount = scale8
272- let $t01417614429 = {
279+ let $t01446914722 = {
273280 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
274281 if ($isInstanceOf(@, "(Int, Int, Int)"))
275282 then @
276283 else throw("Couldn't cast Any to (Int, Int, Int)")
277284 }
278- if (($t01417614429 == $t01417614429))
285+ if (($t01446914722 == $t01446914722))
279286 then {
280- let bonus = $t01417614429._3
281- let feeAmount = $t01417614429._2
282- let lpAmount = $t01417614429._1
287+ let bonus = $t01446914722._3
288+ let feeAmount = $t01446914722._2
289+ let lpAmount = $t01446914722._1
283290 let usdtAssetId = value(getString(keyUsdtAssetId()))
284- let $t01449114709 = {
291+ let $t01478415002 = {
285292 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
286293 if ($isInstanceOf(@, "(Int, Int)"))
287294 then @
288295 else throw("Couldn't cast Any to (Int, Int)")
289296 }
290- if (($t01449114709 == $t01449114709))
297+ if (($t01478415002 == $t01478415002))
291298 then {
292- let getOneTknV2FeeAmount = $t01449114709._2
293- let usdtAmount = $t01449114709._1
299+ let getOneTknV2FeeAmount = $t01478415002._2
300+ let usdtAmount = $t01478415002._1
294301 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
295302 let endPeriodBlocksLeft = (periodEnd - height)
296303 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
432439 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
433440 let entries = if ((claimedAssetId58 == priceAssetId58))
434441 then {
435- let $t02036520809 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
436- let periodMinAvailableToClaim = $t02036520809._1
437- let periodTotalAvailableToClaim = $t02036520809._2
438- let periodUserAvailableToClaim = $t02036520809._3
439- let totalUserAvailableToClaim = $t02036520809._4
440- let usdtPriceAssetAllowableRatio = $t02036520809._5
441- let currentUsdtPriceAssetRatio = $t02036520809._6
442- let endPeriodBlocksLeft = $t02036520809._7
443- let updatedCurrentPeriod = $t02036520809._8
444- let periodStart = $t02036520809._9
445- let periodEnd = $t02036520809._10
442+ let $t02065821102 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
443+ let periodMinAvailableToClaim = $t02065821102._1
444+ let periodTotalAvailableToClaim = $t02065821102._2
445+ let periodUserAvailableToClaim = $t02065821102._3
446+ let totalUserAvailableToClaim = $t02065821102._4
447+ let usdtPriceAssetAllowableRatio = $t02065821102._5
448+ let currentUsdtPriceAssetRatio = $t02065821102._6
449+ let endPeriodBlocksLeft = $t02065821102._7
450+ let updatedCurrentPeriod = $t02065821102._8
451+ let periodStart = $t02065821102._9
452+ let periodEnd = $t02065821102._10
446453 let checks = [if ((periodMinAvailableToClaim > 0))
447454 then true
448455 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))
503510 let availableIdoAmountToClaim = availableToClaimArray[1]
504511 let cfgArray = readConfigArray()
505512 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
506- let $t02704227454 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
507- let periodMinAvailableToClaim = $t02704227454._1
508- let periodTotalAvailableToClaim = $t02704227454._2
509- let periodUserAvailableToClaim = $t02704227454._3
510- let totalUserAvailableToClaim = $t02704227454._4
511- let usdtPriceAssetAllowableRatio = $t02704227454._5
512- let currentUsdtPriceAssetRatio = $t02704227454._6
513- let endPeriodBlocksLeft = $t02704227454._7
514- let updatedCurrentPeriod = $t02704227454._8
515- let periodStart = $t02704227454._9
516- let periodEnd = $t02704227454._10
513+ let $t02733527747 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
514+ let periodMinAvailableToClaim = $t02733527747._1
515+ let periodTotalAvailableToClaim = $t02733527747._2
516+ let periodUserAvailableToClaim = $t02733527747._3
517+ let totalUserAvailableToClaim = $t02733527747._4
518+ let usdtPriceAssetAllowableRatio = $t02733527747._5
519+ let currentUsdtPriceAssetRatio = $t02733527747._6
520+ let endPeriodBlocksLeft = $t02733527747._7
521+ let updatedCurrentPeriod = $t02733527747._8
522+ let periodStart = $t02733527747._9
523+ let periodEnd = $t02733527747._10
517524 let currentPeriodEndHeight = value(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)))
518525 let resultString = if ((height > currentPeriodEndHeight))
519526 then {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
55
66
77 let SEP = "__"
88
99 let BUFSCALE = toBigInt(1000000000000000000)
1010
1111 let scale8 = 100000000
1212
1313 func throwErr (msg) = throw(makeString(["ido.ride:", msg], " "))
1414
1515
1616 func convertPriceAssetIntoIdoAsset (priceAssetAmount,priceAssetMULT,price,priceMULT,idoAssetMULT) = {
1717 let bPriceAssetMULT = toBigInt(priceAssetMULT)
1818 let bIdoAssetMULT = toBigInt(idoAssetMULT)
1919 let bPriceAssetBUF = fraction(toBigInt(priceAssetAmount), BUFSCALE, bPriceAssetMULT)
2020 let bAmountAssetBUF = fraction(bPriceAssetBUF, toBigInt(priceMULT), toBigInt(price))
2121 toInt(fraction(bAmountAssetBUF, toBigInt(idoAssetMULT), BUFSCALE))
2222 }
2323
2424
2525 let IdxCfgIdoStart = 1
2626
2727 let IdxCfgIdoDuration = 2
2828
2929 let IdxCfgClaimStart = 3
3030
3131 let IdxCfgClaimDuration = 4
3232
3333 let IdxCfgPrice = 5
3434
3535 let IdxCfgPriceMult = 6
3636
3737 let IdxCfgIdoAssetId = 7
3838
3939 let IdxCfgIdoAssetMult = 8
4040
4141 let IdxCfgPriceAssetId = 9
4242
4343 let IdxCfgPriceAssetMult = 10
4444
4545 let IdxCfgMinInvestAmount = 11
4646
4747 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)
4848
4949
5050 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))
5151
5252
5353 let IdxInvTotalAmount = 1
5454
5555 let IdxInvRemainingAmount = 2
5656
5757 let IdxInvClaimedPriceAssetAmount = 3
5858
5959 let IdxInvClaimedIdoAssetAmount = 4
6060
6161 let IdxInvLastClaimedHeight = 5
6262
6363 func formatInvestorS (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, claimedPriceAssetAmount, claimedIdoAssetAmount, lastClaimedHeight], SEP)
6464
6565
6666 func formatInvestor (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = formatInvestorS(toString(totalAmount), toString(remainingAmount), toString(claimedPriceAssetAmount), toString(claimedIdoAssetAmount), toString(lastClaimedHeight))
6767
6868
6969 func formatHistoryRecord (priceAssetAmount,idoAssetAmount) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(priceAssetAmount), toString(idoAssetAmount)], SEP)
7070
7171
7272 func keyConfig () = "%s__config"
7373
7474
7575 func keyInvestor (userAddress) = ("%s__" + userAddress)
7676
7777
7878 func keyTotals () = "%s__totals"
7979
8080
8181 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
8282
8383
8484 func keyUSDNClaimDisabled () = "%s__usdnClaimDisabled"
8585
8686
8787 func keyUSDNClaimEndHeight () = "%s__usdnClaimEndHeight"
8888
8989
9090 func keyPeriodLength () = makeString(["%s", "periodLength"], SEP)
9191
9292
9393 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
9494
9595
9696 func keyPeriodStartHeight (periodNum) = makeString(["%s%s", "periodStartHeight", toString(periodNum)], SEP)
9797
9898
9999 func keyPeriodEndHeight (periodNum) = makeString(["%s%s", "periodEndHeight", toString(periodNum)], SEP)
100100
101101
102102 func keyUsdtPriceAssetAllowableRatio () = makeString(["%s", "usdtPriceAssetAllowableRatio"], SEP)
103103
104104
105105 func keyTotalPeriodAllowance (assetId) = makeString(["%s%s", "totalPeriodAllowance", assetId], SEP)
106106
107107
108108 func keyUserPeriodAllowance (assetId) = makeString(["%s%s", "userPeriodAllowance", assetId], SEP)
109109
110110
111111 func keyPeriodTotalAvailableToClaim (assetId,periodNum) = makeString(["%s%s%s", "periodTotalAvailableToClaim", assetId, toString(periodNum)], SEP)
112112
113113
114114 func keyPeriodUserAvailableToClaim (assetId,periodNum,userAddress) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", assetId, toString(periodNum), userAddress], SEP)
115115
116116
117117 func keyUsdtPriceAssetStablePool () = makeString(["%s", "usdtPriceAssetStablePool"], SEP)
118118
119119
120120 func keyUsdtAssetId () = makeString(["%s", "usdtAssetId"], SEP)
121121
122122
123123 func keyPriceAssetBalance (address) = makeString(["%s%s", "priceAssetBalance", address], SEP)
124124
125125
126126 func keyManagerPublicKey () = "%s__managerPublicKey"
127127
128128
129129 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
130130
131131
132132 func readConfigArray () = split(getStringOrFail(keyConfig()), SEP)
133133
134134
135135 func readTotalsArrayOrDefaultByCustomKey (customKey) = split(valueOrElse(getString(customKey), formatInvestorS("0", "0", "0", "0", "0")), SEP)
136136
137137
138138 func readTotalsArrayOrDefault () = readTotalsArrayOrDefaultByCustomKey(keyTotals())
139139
140140
141141 func readInvestorArrayOrDefault (userAddress) = readTotalsArrayOrDefaultByCustomKey(keyInvestor(userAddress))
142142
143143
144144 func readInvestorArrayOrFail (userAddress) = split(getStringOrFail(keyInvestor(userAddress)), SEP)
145145
146146
147147 let IdxDiffTotalIncrement = 0
148148
149149 let IdxDiffRemainingPriceAmountIncrement = 1
150150
151151 let IdxDiffClaimedPriceAmountIncrement = 2
152152
153153 let IdxDiffClaimedIdoAssetAmountIncrement = 3
154154
155155 func TotalsEntry (key,origArray,incrementDiff,newLastClaimedHeight) = {
156156 let totalAmount = parseIntValue(origArray[IdxInvTotalAmount])
157157 let remainingAmount = parseIntValue(origArray[IdxInvRemainingAmount])
158158 let claimedPriceAssetAmount = parseIntValue(origArray[IdxInvClaimedPriceAssetAmount])
159159 let claimedIdoAssetAmount = parseIntValue(origArray[IdxInvClaimedIdoAssetAmount])
160160 let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight])
161161 let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement])
162162 let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement])
163163 let newClaimedPriceAssetAmount = (claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement])
164164 let newClaimedIdoAssetAmount = (claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement])
165165 if ((0 > newRemainingAmount))
166166 then throw("invalid math")
167167 else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight))
168168 }
169169
170170
171171 func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
172172
173173
174174 func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
175175
176176
177177 func internalClaim (claimedAssetId58,userAddress,txId) = {
178178 let cfgArray = readConfigArray()
179179 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
180180 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
181181 let claimEnd = (claimStart + claimDuration)
182182 let price = parseIntValue(cfgArray[IdxCfgPrice])
183183 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
184184 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
185185 let idoAssetId = fromBase58String(idoAssetId58)
186186 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
187187 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
188188 let priceAssetId = fromBase58String(priceAssetId58)
189189 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
190190 let userAddress58 = toString(userAddress)
191191 let origInvestArray = readInvestorArrayOrFail(userAddress58)
192192 let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount])
193193 let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight])
194194 let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP))
195195 then claimStart
196196 else investLastClaimedHeightTMP
197197 let newClaimPeriodHeight = if ((height > claimEnd))
198198 then claimEnd
199199 else if ((claimStart > height))
200200 then claimStart
201201 else height
202202 let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight)
203203 let claimingPriceAssetAmount = fraction(investTotalAmount, claimingBlocks, claimDuration)
204204 let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult)
205205 let isUSDN = (claimedAssetId58 == priceAssetId58)
206206 let isUSDNClaimDisabled = valueOrElse(getBoolean(keyUSDNClaimDisabled()), false)
207207 let checks = [if (!(if (isUSDN)
208208 then isUSDNClaimDisabled
209209 else false))
210210 then true
211211 else throw("USDN claim is disabled")]
212212 if ((checks == checks))
213213 then if ((claimedAssetId58 == priceAssetId58))
214214 then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
215215 else if ((claimedAssetId58 == idoAssetId58))
216216 then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
217217 else throw(("unsupported assetId: " + claimedAssetId58))
218218 else throw("Strict value is not equal to itself.")
219219 }
220220
221221
222222 func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = {
223223 let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
224224 let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
225225 let periodLength = value(getInteger(keyPeriodLength()))
226226 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
227227 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
228- let $t01183513421 = if ((currentPeriod > 0))
228+ let $t01183513714 = if ((currentPeriod > 0))
229229 then {
230230 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1))))
231231 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1))))
232- let $t01210312516 = if ((height > lastPeriodEndHeight))
232+ let $t01210312809 = if ((height > lastPeriodEndHeight))
233233 then {
234234 let updatedCurrentPeriod = (currentPeriod + 1)
235- let periodStart = (height - ((height - lastPeriodEndHeight) % periodLength))
235+ let periodStart = if ((height > (lastPeriodEndHeight + periodLength)))
236+ then {
237+ let blocksToLastPeriodStart = ((height - lastPeriodEndHeight) % periodLength)
238+ if ((blocksToLastPeriodStart == 0))
239+ then ((height - periodLength) + 1)
240+ else (height - blocksToLastPeriodStart)
241+ }
242+ else (lastPeriodEndHeight + 1)
236243 let periodEnd = ((periodStart + periodLength) - 1)
237244 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
238245 }
239246 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
240- let updatedCurrentPeriod = $t01210312516._1
241- let periodStart = $t01210312516._2
242- let periodEnd = $t01210312516._3
247+ let updatedCurrentPeriod = $t01210312809._1
248+ let periodStart = $t01210312809._2
249+ let periodEnd = $t01210312809._3
243250 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
244251 }
245252 else if (zeroPeriodEndHeighIsDefined)
246253 then {
247254 let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
248255 let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
249- let $t01277113153 = if ((height > zeroPeriodEndHeight))
256+ let $t01306413446 = if ((height > zeroPeriodEndHeight))
250257 then {
251258 let updatedCurrentPeriod = (currentPeriod + 1)
252259 let periodStart = (zeroPeriodEndHeight + 1)
253260 let periodEnd = ((periodStart + periodLength) - 1)
254261 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
255262 }
256263 else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
257- let updatedCurrentPeriod = $t01277113153._1
258- let periodStart = $t01277113153._2
259- let periodEnd = $t01277113153._3
264+ let updatedCurrentPeriod = $t01306413446._1
265+ let periodStart = $t01306413446._2
266+ let periodEnd = $t01306413446._3
260267 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
261268 }
262269 else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
263- let updatedCurrentPeriod = $t01183513421._1
264- let periodStart = $t01183513421._2
265- let periodEnd = $t01183513421._3
270+ let updatedCurrentPeriod = $t01183513714._1
271+ let periodStart = $t01183513714._2
272+ let periodEnd = $t01183513714._3
266273 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
267274 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
268275 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
269276 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
270277 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
271278 let putOneTknV2PriceAssetAmount = scale8
272- let $t01417614429 = {
279+ let $t01446914722 = {
273280 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
274281 if ($isInstanceOf(@, "(Int, Int, Int)"))
275282 then @
276283 else throw("Couldn't cast Any to (Int, Int, Int)")
277284 }
278- if (($t01417614429 == $t01417614429))
285+ if (($t01446914722 == $t01446914722))
279286 then {
280- let bonus = $t01417614429._3
281- let feeAmount = $t01417614429._2
282- let lpAmount = $t01417614429._1
287+ let bonus = $t01446914722._3
288+ let feeAmount = $t01446914722._2
289+ let lpAmount = $t01446914722._1
283290 let usdtAssetId = value(getString(keyUsdtAssetId()))
284- let $t01449114709 = {
291+ let $t01478415002 = {
285292 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
286293 if ($isInstanceOf(@, "(Int, Int)"))
287294 then @
288295 else throw("Couldn't cast Any to (Int, Int)")
289296 }
290- if (($t01449114709 == $t01449114709))
297+ if (($t01478415002 == $t01478415002))
291298 then {
292- let getOneTknV2FeeAmount = $t01449114709._2
293- let usdtAmount = $t01449114709._1
299+ let getOneTknV2FeeAmount = $t01478415002._2
300+ let usdtAmount = $t01478415002._1
294301 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
295302 let endPeriodBlocksLeft = (periodEnd - height)
296303 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
297304 }
298305 else throw("Strict value is not equal to itself.")
299306 }
300307 else throw("Strict value is not equal to itself.")
301308 }
302309
303310
304311 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
305312 case s: String =>
306313 fromBase58String(s)
307314 case _: Unit =>
308315 unit
309316 case _ =>
310317 throw("Match error")
311318 }
312319
313320
314321 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
315322 case s: String =>
316323 fromBase58String(s)
317324 case _: Unit =>
318325 unit
319326 case _ =>
320327 throw("Match error")
321328 }
322329
323330
324331 func mustManager (i) = {
325332 let pd = throw("Permission denied")
326333 match managerPublicKeyOrUnit() {
327334 case pk: ByteVector =>
328335 if ((i.callerPublicKey == pk))
329336 then true
330337 else pd
331338 case _: Unit =>
332339 if ((i.caller == this))
333340 then true
334341 else pd
335342 case _ =>
336343 throw("Match error")
337344 }
338345 }
339346
340347
341348 @Callable(i)
342349 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
343350 let priceMult = ((100 * 1000) * 1000)
344351 let idoEnd = (idoStart + idoDuration)
345352 if (isDefined(getString(keyConfig())))
346353 then throw("already initialized")
347354 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
348355 then throw("not authorized")
349356 else if ((size(i.payments) != 1))
350357 then throw("exactly 1 payment must be attached")
351358 else if ((idoEnd >= claimStart))
352359 then throw("claimStart must be greater than idoEnd")
353360 else {
354361 let pmt = value(i.payments[0])
355362 let idoAssetId = value(pmt.assetId)
356363 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
357364 let idoAssetId58 = toBase58String(idoAssetId)
358365 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
359366 let priceAssetId = fromBase58String(priceAssetId58)
360367 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
361368 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
362369 let origTotalsArray = readTotalsArrayOrDefault()
363370 let totalsDiff = [0, 0, 0, 0]
364371 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)]
365372 }
366373 }
367374
368375
369376
370377 @Callable(i)
371378 func invest () = {
372379 let cfgArray = readConfigArray()
373380 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
374381 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
375382 let idoEnd = (idoStart + idoDuration)
376383 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
377384 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
378385 let price = parseIntValue(cfgArray[IdxCfgPrice])
379386 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
380387 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
381388 let idoAssetId = fromBase58String(idoAssetId58)
382389 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
383390 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
384391 let priceAssetId = fromBase58String(priceAssetId58)
385392 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
386393 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
387394 let userAddress = toString(i.caller)
388395 if ((idoStart > height))
389396 then throw("ido has not been started yet")
390397 else if ((height > idoEnd))
391398 then throw("ido has been already ended")
392399 else if ((size(i.payments) != 1))
393400 then throw("exactly 1 payment is expected")
394401 else {
395402 let pmt = value(i.payments[0])
396403 let pmtAssetId = value(pmt.assetId)
397404 let pmtAmount = pmt.amount
398405 if ((pmtAssetId != priceAssetId))
399406 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
400407 else {
401408 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
402409 let origTotalsArray = readTotalsArrayOrDefault()
403410 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
404411 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
405412 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
406413 then throw("IDO asset has been - sold consider to use smaller payment")
407414 else {
408415 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
409416 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
410417 }
411418 }
412419 }
413420 }
414421
415422
416423
417424 @Callable(i)
418425 func claim (claimedAssetId58,userAddress58) = {
419426 let callerAddress58 = toString(i.caller)
420427 if ((userAddress58 != callerAddress58))
421428 then throw("not authorized")
422429 else {
423430 let cfgArray = readConfigArray()
424431 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
425432 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
426433 let totalsDiff = claimResultTuple._1
427434 let outAmount = claimResultTuple._2
428435 let outAssetId = claimResultTuple._3
429436 let origInvestArray = claimResultTuple._4
430437 let newClaimPeriodHeight = claimResultTuple._5
431438 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
432439 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
433440 let entries = if ((claimedAssetId58 == priceAssetId58))
434441 then {
435- let $t02036520809 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
436- let periodMinAvailableToClaim = $t02036520809._1
437- let periodTotalAvailableToClaim = $t02036520809._2
438- let periodUserAvailableToClaim = $t02036520809._3
439- let totalUserAvailableToClaim = $t02036520809._4
440- let usdtPriceAssetAllowableRatio = $t02036520809._5
441- let currentUsdtPriceAssetRatio = $t02036520809._6
442- let endPeriodBlocksLeft = $t02036520809._7
443- let updatedCurrentPeriod = $t02036520809._8
444- let periodStart = $t02036520809._9
445- let periodEnd = $t02036520809._10
442+ let $t02065821102 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
443+ let periodMinAvailableToClaim = $t02065821102._1
444+ let periodTotalAvailableToClaim = $t02065821102._2
445+ let periodUserAvailableToClaim = $t02065821102._3
446+ let totalUserAvailableToClaim = $t02065821102._4
447+ let usdtPriceAssetAllowableRatio = $t02065821102._5
448+ let currentUsdtPriceAssetRatio = $t02065821102._6
449+ let endPeriodBlocksLeft = $t02065821102._7
450+ let updatedCurrentPeriod = $t02065821102._8
451+ let periodStart = $t02065821102._9
452+ let periodEnd = $t02065821102._10
446453 let checks = [if ((periodMinAvailableToClaim > 0))
447454 then true
448455 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))
449456 then true
450457 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
451458 then true
452459 else throwErr("unavailable to claim because total period allowance reached"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio))
453460 then true
454461 else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")]
455462 if ((checks == checks))
456463 then {
457464 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
458465 let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim)
459466 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
460467 let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
461468 then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
462469 else {
463470 let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
464471 [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)]
465472 }
466473 $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)
467474 }
468475 else throw("Strict value is not equal to itself.")
469476 }
470477 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)
471478 entries
472479 }
473480 }
474481
475482
476483
477484 @Callable(i)
478485 func claimREADONLY (claimedAssetId58,userAddress58) = {
479486 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
480487 let totalsDiff = claimResultTuple._1
481488 let outAmount = claimResultTuple._2
482489 let outAssetId = claimResultTuple._3
483490 let origInvestArray = claimResultTuple._4
484491 let newClaimPeriodHeight = claimResultTuple._5
485492 let availableToClaimArray = claimResultTuple._6
486493 let availablePriceAmountToClaim = availableToClaimArray[0]
487494 let availableIdoAmountToClaim = availableToClaimArray[1]
488495 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
489496 }
490497
491498
492499
493500 @Callable(i)
494501 func claimV2READONLY (claimedAssetId58,userAddress58) = {
495502 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
496503 let totalsDiff = claimResultTuple._1
497504 let outAmount = claimResultTuple._2
498505 let outAssetId = claimResultTuple._3
499506 let origInvestArray = claimResultTuple._4
500507 let newClaimPeriodHeight = claimResultTuple._5
501508 let availableToClaimArray = claimResultTuple._6
502509 let availablePriceAmountToClaim = availableToClaimArray[0]
503510 let availableIdoAmountToClaim = availableToClaimArray[1]
504511 let cfgArray = readConfigArray()
505512 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
506- let $t02704227454 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
507- let periodMinAvailableToClaim = $t02704227454._1
508- let periodTotalAvailableToClaim = $t02704227454._2
509- let periodUserAvailableToClaim = $t02704227454._3
510- let totalUserAvailableToClaim = $t02704227454._4
511- let usdtPriceAssetAllowableRatio = $t02704227454._5
512- let currentUsdtPriceAssetRatio = $t02704227454._6
513- let endPeriodBlocksLeft = $t02704227454._7
514- let updatedCurrentPeriod = $t02704227454._8
515- let periodStart = $t02704227454._9
516- let periodEnd = $t02704227454._10
513+ let $t02733527747 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
514+ let periodMinAvailableToClaim = $t02733527747._1
515+ let periodTotalAvailableToClaim = $t02733527747._2
516+ let periodUserAvailableToClaim = $t02733527747._3
517+ let totalUserAvailableToClaim = $t02733527747._4
518+ let usdtPriceAssetAllowableRatio = $t02733527747._5
519+ let currentUsdtPriceAssetRatio = $t02733527747._6
520+ let endPeriodBlocksLeft = $t02733527747._7
521+ let updatedCurrentPeriod = $t02733527747._8
522+ let periodStart = $t02733527747._9
523+ let periodEnd = $t02733527747._10
517524 let currentPeriodEndHeight = value(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)))
518525 let resultString = if ((height > currentPeriodEndHeight))
519526 then {
520527 let periodLenght = value(getInteger(keyPeriodLength()))
521528 let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
522529 let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
523530 makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaim), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght)], SEP)
524531 }
525532 else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaim), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft)], SEP)
526533 $Tuple2(nil, resultString)
527534 }
528535
529536
530537
531538 @Callable(i)
532539 func setManager (pendingManagerPublicKey) = {
533540 let checkCaller = mustManager(i)
534541 if ((checkCaller == checkCaller))
535542 then {
536543 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
537544 if ((checkManagerPublicKey == checkManagerPublicKey))
538545 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
539546 else throw("Strict value is not equal to itself.")
540547 }
541548 else throw("Strict value is not equal to itself.")
542549 }
543550
544551
545552
546553 @Callable(i)
547554 func confirmManager () = {
548555 let pm = pendingManagerPublicKeyOrUnit()
549556 let hasPM = if (isDefined(pm))
550557 then true
551558 else throw("No pending manager")
552559 if ((hasPM == hasPM))
553560 then {
554561 let checkPM = if ((i.callerPublicKey == value(pm)))
555562 then true
556563 else throw("You are not pending manager")
557564 if ((checkPM == checkPM))
558565 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
559566 else throw("Strict value is not equal to itself.")
560567 }
561568 else throw("Strict value is not equal to itself.")
562569 }
563570
564571
565572 @Verifier(tx)
566573 func verify () = {
567574 let targetPublicKey = match managerPublicKeyOrUnit() {
568575 case pk: ByteVector =>
569576 pk
570577 case _: Unit =>
571578 tx.senderPublicKey
572579 case _ =>
573580 throw("Match error")
574581 }
575582 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
576583 }
577584

github/deemru/w8io/026f985 
75.80 ms