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:AAIFAAAAAAAADogIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZmdQcmljZUFzc2V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uYWdlcgMJAAAAAAAAAgUAAAACY1IFAAAAAmNSCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAJhQgAAAAAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQUAAAACY1AJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAAmFDAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAmNTAQAAAAJjVAAAAAAEAAAAAmNVBAAAAAJjYQkBAAAAAmJaAAAAAAMJAAABAAAAAgUAAAACY2ECAAAACkJ5dGVWZWN0b3IEAAAAAmNnBQAAAAJjYQUAAAACY2cDCQAAAQAAAAIFAAAAAmNhAgAAAARVbml0CAUAAAACY1MAAAAPc2VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJjUwAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmNTAAAABnByb29mcwAAAAAAAAAAAAUAAAACY1Wk2t/W", "chainId": 84, "height": 2299895, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 59ScimVV9rdyddhpeKirTdauibTBLhEQFL2usea7BG5p Next: HfgW1eUAcygZBBWAFJ7YDE5gu44KCN8qU1NQB7AVn8US Diff:
OldNewDifferences
204204 let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult)
205205 let isUSDN = (claimedAssetId58 == priceAssetId58)
206206 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- }
215207 let checks = [if (!(if (isUSDN)
216208 then isUSDNClaimDisabled
217209 else false))
218210 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")]
224212 if ((checks == checks))
225213 then if ((claimedAssetId58 == priceAssetId58))
226214 then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
237225 let periodLength = value(getInteger(keyPeriodLength()))
238226 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
239227 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
240- let $t01203113586 = if ((currentPeriod > 0))
228+ let $t01183513390 = if ((currentPeriod > 0))
241229 then {
242230 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1))))
243231 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1))))
244- let $t01229912681 = if ((height > lastPeriodEndHeight))
232+ let $t01210312485 = if ((height > lastPeriodEndHeight))
245233 then {
246234 let updatedCurrentPeriod = (currentPeriod + 1)
247235 let periodStart = (lastPeriodEndHeight + 1)
249237 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
250238 }
251239 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
252- let updatedCurrentPeriod = $t01229912681._1
253- let periodStart = $t01229912681._2
254- let periodEnd = $t01229912681._3
240+ let updatedCurrentPeriod = $t01210312485._1
241+ let periodStart = $t01210312485._2
242+ let periodEnd = $t01210312485._3
255243 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
256244 }
257245 else if (zeroPeriodEndHeighIsDefined)
258246 then {
259247 let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
260248 let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
261- let $t01293613318 = if ((height > zeroPeriodEndHeight))
249+ let $t01274013122 = if ((height > zeroPeriodEndHeight))
262250 then {
263251 let updatedCurrentPeriod = (currentPeriod + 1)
264252 let periodStart = (zeroPeriodEndHeight + 1)
266254 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
267255 }
268256 else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
269- let updatedCurrentPeriod = $t01293613318._1
270- let periodStart = $t01293613318._2
271- let periodEnd = $t01293613318._3
257+ let updatedCurrentPeriod = $t01274013122._1
258+ let periodStart = $t01274013122._2
259+ let periodEnd = $t01274013122._3
272260 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
273261 }
274262 else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
275- let updatedCurrentPeriod = $t01203113586._1
276- let periodStart = $t01203113586._2
277- let periodEnd = $t01203113586._3
263+ let updatedCurrentPeriod = $t01183513390._1
264+ let periodStart = $t01183513390._2
265+ let periodEnd = $t01183513390._3
278266 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
279267 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
280268 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
281269 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
282270 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
283271 let putOneTknV2PriceAssetAmount = scale8
284- let $t01434114594 = {
272+ let $t01414514398 = {
285273 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
286274 if ($isInstanceOf(@, "(Int, Int, Int)"))
287275 then @
288276 else throw("Couldn't cast Any to (Int, Int, Int)")
289277 }
290- if (($t01434114594 == $t01434114594))
278+ if (($t01414514398 == $t01414514398))
291279 then {
292- let bonus = $t01434114594._3
293- let feeAmount = $t01434114594._2
294- let lpAmount = $t01434114594._1
280+ let bonus = $t01414514398._3
281+ let feeAmount = $t01414514398._2
282+ let lpAmount = $t01414514398._1
295283 let usdtAssetId = value(getString(keyUsdtAssetId()))
296- let $t01465614874 = {
284+ let $t01446014678 = {
297285 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
298286 if ($isInstanceOf(@, "(Int, Int)"))
299287 then @
300288 else throw("Couldn't cast Any to (Int, Int)")
301289 }
302- if (($t01465614874 == $t01465614874))
290+ if (($t01446014678 == $t01446014678))
303291 then {
304- let getOneTknV2FeeAmount = $t01465614874._2
305- let usdtAmount = $t01465614874._1
292+ let getOneTknV2FeeAmount = $t01446014678._2
293+ let usdtAmount = $t01446014678._1
306294 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
307295 let endPeriodBlocksLeft = (periodEnd - height)
308296 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
444432 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
445433 let entries = if ((claimedAssetId58 == priceAssetId58))
446434 then {
447- let $t02053020974 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
448- let periodMinAvailableToClaim = $t02053020974._1
449- let periodTotalAvailableToClaim = $t02053020974._2
450- let periodUserAvailableToClaim = $t02053020974._3
451- let totalUserAvailableToClaim = $t02053020974._4
452- let usdtPriceAssetAllowableRatio = $t02053020974._5
453- let currentUsdtPriceAssetRatio = $t02053020974._6
454- let endPeriodBlocksLeft = $t02053020974._7
455- let updatedCurrentPeriod = $t02053020974._8
456- let periodStart = $t02053020974._9
457- let periodEnd = $t02053020974._10
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
458446 let checks = [if ((periodMinAvailableToClaim > 0))
459447 then true
460448 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))
515503 let availableIdoAmountToClaim = availableToClaimArray[1]
516504 let cfgArray = readConfigArray()
517505 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
518- let $t02720727619 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
519- let periodMinAvailableToClaim = $t02720727619._1
520- let periodTotalAvailableToClaim = $t02720727619._2
521- let periodUserAvailableToClaim = $t02720727619._3
522- let totalUserAvailableToClaim = $t02720727619._4
523- let usdtPriceAssetAllowableRatio = $t02720727619._5
524- let currentUsdtPriceAssetRatio = $t02720727619._6
525- let endPeriodBlocksLeft = $t02720727619._7
526- let updatedCurrentPeriod = $t02720727619._8
527- let periodStart = $t02720727619._9
528- let periodEnd = $t02720727619._10
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
529517 let currentPeriodEndHeight = value(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)))
530518 let resultString = if ((height > currentPeriodEndHeight))
531519 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)
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- }
215207 let checks = [if (!(if (isUSDN)
216208 then isUSDNClaimDisabled
217209 else false))
218210 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")]
224212 if ((checks == checks))
225213 then if ((claimedAssetId58 == priceAssetId58))
226214 then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
227215 else if ((claimedAssetId58 == idoAssetId58))
228216 then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
229217 else throw(("unsupported assetId: " + claimedAssetId58))
230218 else throw("Strict value is not equal to itself.")
231219 }
232220
233221
234222 func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = {
235223 let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
236224 let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
237225 let periodLength = value(getInteger(keyPeriodLength()))
238226 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
239227 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
240- let $t01203113586 = if ((currentPeriod > 0))
228+ let $t01183513390 = if ((currentPeriod > 0))
241229 then {
242230 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1))))
243231 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1))))
244- let $t01229912681 = if ((height > lastPeriodEndHeight))
232+ let $t01210312485 = if ((height > lastPeriodEndHeight))
245233 then {
246234 let updatedCurrentPeriod = (currentPeriod + 1)
247235 let periodStart = (lastPeriodEndHeight + 1)
248236 let periodEnd = ((periodStart + periodLength) - 1)
249237 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
250238 }
251239 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
252- let updatedCurrentPeriod = $t01229912681._1
253- let periodStart = $t01229912681._2
254- let periodEnd = $t01229912681._3
240+ let updatedCurrentPeriod = $t01210312485._1
241+ let periodStart = $t01210312485._2
242+ let periodEnd = $t01210312485._3
255243 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
256244 }
257245 else if (zeroPeriodEndHeighIsDefined)
258246 then {
259247 let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
260248 let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
261- let $t01293613318 = if ((height > zeroPeriodEndHeight))
249+ let $t01274013122 = if ((height > zeroPeriodEndHeight))
262250 then {
263251 let updatedCurrentPeriod = (currentPeriod + 1)
264252 let periodStart = (zeroPeriodEndHeight + 1)
265253 let periodEnd = ((periodStart + periodLength) - 1)
266254 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
267255 }
268256 else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
269- let updatedCurrentPeriod = $t01293613318._1
270- let periodStart = $t01293613318._2
271- let periodEnd = $t01293613318._3
257+ let updatedCurrentPeriod = $t01274013122._1
258+ let periodStart = $t01274013122._2
259+ let periodEnd = $t01274013122._3
272260 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
273261 }
274262 else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
275- let updatedCurrentPeriod = $t01203113586._1
276- let periodStart = $t01203113586._2
277- let periodEnd = $t01203113586._3
263+ let updatedCurrentPeriod = $t01183513390._1
264+ let periodStart = $t01183513390._2
265+ let periodEnd = $t01183513390._3
278266 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
279267 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
280268 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
281269 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
282270 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
283271 let putOneTknV2PriceAssetAmount = scale8
284- let $t01434114594 = {
272+ let $t01414514398 = {
285273 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
286274 if ($isInstanceOf(@, "(Int, Int, Int)"))
287275 then @
288276 else throw("Couldn't cast Any to (Int, Int, Int)")
289277 }
290- if (($t01434114594 == $t01434114594))
278+ if (($t01414514398 == $t01414514398))
291279 then {
292- let bonus = $t01434114594._3
293- let feeAmount = $t01434114594._2
294- let lpAmount = $t01434114594._1
280+ let bonus = $t01414514398._3
281+ let feeAmount = $t01414514398._2
282+ let lpAmount = $t01414514398._1
295283 let usdtAssetId = value(getString(keyUsdtAssetId()))
296- let $t01465614874 = {
284+ let $t01446014678 = {
297285 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
298286 if ($isInstanceOf(@, "(Int, Int)"))
299287 then @
300288 else throw("Couldn't cast Any to (Int, Int)")
301289 }
302- if (($t01465614874 == $t01465614874))
290+ if (($t01446014678 == $t01446014678))
303291 then {
304- let getOneTknV2FeeAmount = $t01465614874._2
305- let usdtAmount = $t01465614874._1
292+ let getOneTknV2FeeAmount = $t01446014678._2
293+ let usdtAmount = $t01446014678._1
306294 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
307295 let endPeriodBlocksLeft = (periodEnd - height)
308296 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
309297 }
310298 else throw("Strict value is not equal to itself.")
311299 }
312300 else throw("Strict value is not equal to itself.")
313301 }
314302
315303
316304 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
317305 case s: String =>
318306 fromBase58String(s)
319307 case _: Unit =>
320308 unit
321309 case _ =>
322310 throw("Match error")
323311 }
324312
325313
326314 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
327315 case s: String =>
328316 fromBase58String(s)
329317 case _: Unit =>
330318 unit
331319 case _ =>
332320 throw("Match error")
333321 }
334322
335323
336324 func mustManager (i) = {
337325 let pd = throw("Permission denied")
338326 match managerPublicKeyOrUnit() {
339327 case pk: ByteVector =>
340328 if ((i.callerPublicKey == pk))
341329 then true
342330 else pd
343331 case _: Unit =>
344332 if ((i.caller == this))
345333 then true
346334 else pd
347335 case _ =>
348336 throw("Match error")
349337 }
350338 }
351339
352340
353341 @Callable(i)
354342 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
355343 let priceMult = ((100 * 1000) * 1000)
356344 let idoEnd = (idoStart + idoDuration)
357345 if (isDefined(getString(keyConfig())))
358346 then throw("already initialized")
359347 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
360348 then throw("not authorized")
361349 else if ((size(i.payments) != 1))
362350 then throw("exactly 1 payment must be attached")
363351 else if ((idoEnd >= claimStart))
364352 then throw("claimStart must be greater than idoEnd")
365353 else {
366354 let pmt = value(i.payments[0])
367355 let idoAssetId = value(pmt.assetId)
368356 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
369357 let idoAssetId58 = toBase58String(idoAssetId)
370358 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
371359 let priceAssetId = fromBase58String(priceAssetId58)
372360 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
373361 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
374362 let origTotalsArray = readTotalsArrayOrDefault()
375363 let totalsDiff = [0, 0, 0, 0]
376364 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)]
377365 }
378366 }
379367
380368
381369
382370 @Callable(i)
383371 func invest () = {
384372 let cfgArray = readConfigArray()
385373 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
386374 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
387375 let idoEnd = (idoStart + idoDuration)
388376 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
389377 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
390378 let price = parseIntValue(cfgArray[IdxCfgPrice])
391379 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
392380 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
393381 let idoAssetId = fromBase58String(idoAssetId58)
394382 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
395383 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
396384 let priceAssetId = fromBase58String(priceAssetId58)
397385 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
398386 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
399387 let userAddress = toString(i.caller)
400388 if ((idoStart > height))
401389 then throw("ido has not been started yet")
402390 else if ((height > idoEnd))
403391 then throw("ido has been already ended")
404392 else if ((size(i.payments) != 1))
405393 then throw("exactly 1 payment is expected")
406394 else {
407395 let pmt = value(i.payments[0])
408396 let pmtAssetId = value(pmt.assetId)
409397 let pmtAmount = pmt.amount
410398 if ((pmtAssetId != priceAssetId))
411399 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
412400 else {
413401 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
414402 let origTotalsArray = readTotalsArrayOrDefault()
415403 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
416404 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
417405 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
418406 then throw("IDO asset has been - sold consider to use smaller payment")
419407 else {
420408 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
421409 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
422410 }
423411 }
424412 }
425413 }
426414
427415
428416
429417 @Callable(i)
430418 func claim (claimedAssetId58,userAddress58) = {
431419 let callerAddress58 = toString(i.caller)
432420 if ((userAddress58 != callerAddress58))
433421 then throw("not authorized")
434422 else {
435423 let cfgArray = readConfigArray()
436424 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
437425 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
438426 let totalsDiff = claimResultTuple._1
439427 let outAmount = claimResultTuple._2
440428 let outAssetId = claimResultTuple._3
441429 let origInvestArray = claimResultTuple._4
442430 let newClaimPeriodHeight = claimResultTuple._5
443431 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
444432 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
445433 let entries = if ((claimedAssetId58 == priceAssetId58))
446434 then {
447- let $t02053020974 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
448- let periodMinAvailableToClaim = $t02053020974._1
449- let periodTotalAvailableToClaim = $t02053020974._2
450- let periodUserAvailableToClaim = $t02053020974._3
451- let totalUserAvailableToClaim = $t02053020974._4
452- let usdtPriceAssetAllowableRatio = $t02053020974._5
453- let currentUsdtPriceAssetRatio = $t02053020974._6
454- let endPeriodBlocksLeft = $t02053020974._7
455- let updatedCurrentPeriod = $t02053020974._8
456- let periodStart = $t02053020974._9
457- let periodEnd = $t02053020974._10
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
458446 let checks = [if ((periodMinAvailableToClaim > 0))
459447 then true
460448 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))
461449 then true
462450 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
463451 then true
464452 else throwErr("unavailable to claim because total period allowance reached"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio))
465453 then true
466454 else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")]
467455 if ((checks == checks))
468456 then {
469457 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
470458 let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim)
471459 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
472460 let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
473461 then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
474462 else {
475463 let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
476464 [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)]
477465 }
478466 $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)
479467 }
480468 else throw("Strict value is not equal to itself.")
481469 }
482470 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)
483471 entries
484472 }
485473 }
486474
487475
488476
489477 @Callable(i)
490478 func claimREADONLY (claimedAssetId58,userAddress58) = {
491479 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
492480 let totalsDiff = claimResultTuple._1
493481 let outAmount = claimResultTuple._2
494482 let outAssetId = claimResultTuple._3
495483 let origInvestArray = claimResultTuple._4
496484 let newClaimPeriodHeight = claimResultTuple._5
497485 let availableToClaimArray = claimResultTuple._6
498486 let availablePriceAmountToClaim = availableToClaimArray[0]
499487 let availableIdoAmountToClaim = availableToClaimArray[1]
500488 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
501489 }
502490
503491
504492
505493 @Callable(i)
506494 func claimV2READONLY (claimedAssetId58,userAddress58) = {
507495 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
508496 let totalsDiff = claimResultTuple._1
509497 let outAmount = claimResultTuple._2
510498 let outAssetId = claimResultTuple._3
511499 let origInvestArray = claimResultTuple._4
512500 let newClaimPeriodHeight = claimResultTuple._5
513501 let availableToClaimArray = claimResultTuple._6
514502 let availablePriceAmountToClaim = availableToClaimArray[0]
515503 let availableIdoAmountToClaim = availableToClaimArray[1]
516504 let cfgArray = readConfigArray()
517505 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
518- let $t02720727619 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
519- let periodMinAvailableToClaim = $t02720727619._1
520- let periodTotalAvailableToClaim = $t02720727619._2
521- let periodUserAvailableToClaim = $t02720727619._3
522- let totalUserAvailableToClaim = $t02720727619._4
523- let usdtPriceAssetAllowableRatio = $t02720727619._5
524- let currentUsdtPriceAssetRatio = $t02720727619._6
525- let endPeriodBlocksLeft = $t02720727619._7
526- let updatedCurrentPeriod = $t02720727619._8
527- let periodStart = $t02720727619._9
528- let periodEnd = $t02720727619._10
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
529517 let currentPeriodEndHeight = value(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)))
530518 let resultString = if ((height > currentPeriodEndHeight))
531519 then {
532520 let periodLenght = value(getInteger(keyPeriodLength()))
533521 let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
534522 let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
535523 makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaim), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght)], SEP)
536524 }
537525 else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaim), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft)], SEP)
538526 $Tuple2(nil, resultString)
539527 }
540528
541529
542530
543531 @Callable(i)
544532 func setManager (pendingManagerPublicKey) = {
545533 let checkCaller = mustManager(i)
546534 if ((checkCaller == checkCaller))
547535 then {
548536 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
549537 if ((checkManagerPublicKey == checkManagerPublicKey))
550538 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
551539 else throw("Strict value is not equal to itself.")
552540 }
553541 else throw("Strict value is not equal to itself.")
554542 }
555543
556544
557545
558546 @Callable(i)
559547 func confirmManager () = {
560548 let pm = pendingManagerPublicKeyOrUnit()
561549 let hasPM = if (isDefined(pm))
562550 then true
563551 else throw("No pending manager")
564552 if ((hasPM == hasPM))
565553 then {
566554 let checkPM = if ((i.callerPublicKey == value(pm)))
567555 then true
568556 else throw("You are not pending manager")
569557 if ((checkPM == checkPM))
570558 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
571559 else throw("Strict value is not equal to itself.")
572560 }
573561 else throw("Strict value is not equal to itself.")
574562 }
575563
576564
577565 @Verifier(tx)
578566 func verify () = {
579567 let targetPublicKey = match managerPublicKeyOrUnit() {
580568 case pk: ByteVector =>
581569 pk
582570 case _: Unit =>
583571 tx.senderPublicKey
584572 case _ =>
585573 throw("Match error")
586574 }
587575 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
588576 }
589577

github/deemru/w8io/026f985 
87.36 ms