tx · 7qFDXcHWAiZ2sArHHUKhCP5jESgXKc85pWWV1Cjphwmi

3MrfwTQPjiMpon8KZcJjatDLHbWNwVyadKE:  -0.02600000 Waves

2022.11.03 20:32 [2301229] smart account 3MrfwTQPjiMpon8KZcJjatDLHbWNwVyadKE > SELF 0.00000000 Waves

{ "type": 13, "id": "7qFDXcHWAiZ2sArHHUKhCP5jESgXKc85pWWV1Cjphwmi", "fee": 2600000, "feeAssetId": null, "timestamp": 1667496783693, "version": 1, "sender": "3MrfwTQPjiMpon8KZcJjatDLHbWNwVyadKE", "senderPublicKey": "6bj3L3GyaTejhux59f2iQkvXJZ9hAukkWN67hi3X8ND4", "proofs": [ "2ZYKvzwTnHJU7TdoTcbi3ofZAudVua69Vt29zV5k7wZJeNw5GbdUXLJLbXwKPMmxavZtgBbUkBMtgcuuRfuSYy4F" ], "script": "base64:AAIFAAAAAAAAD0QIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZmdQcmljZUFzc2V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ALU3RyaW5nRW50cnkAAAACCQEAAAACYUIAAAAACQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEFAAAAAmNWCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAJhQwAAAAAFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJjWQEAAAACY1oAAAAABAAAAAJkYQQAAAACY2QJAQAAAAJjYwAAAAADCQAAAQAAAAIFAAAAAmNkAgAAAApCeXRlVmVjdG9yBAAAAAJjagUAAAACY2QFAAAAAmNqAwkAAAEAAAACBQAAAAJjZAIAAAAEVW5pdAgFAAAAAmNZAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACY1kAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJjWQAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmRhySuB/A==", "chainId": 84, "height": 2301229, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AqDVioR45UBkR19ZdTuh7LWhP5CxejjGpWaVmaJA1yhX Next: Ff5XqoKG2NoK8jnrHmyPLbrJ4Shnw3Uo8J6XAj5pFDRD Diff:
OldNewDifferences
160160 let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight])
161161 let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement])
162162 let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement])
163+ let cfgArray = readConfigArray()
164+ let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
165+ let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals
166+ let priceAssetBalancePriceAssetDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN))
163167 let newClaimedPriceAssetAmount = ((claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement]) - priceAssetBalance)
164- let newClaimedIdoAssetAmount = ((claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) + priceAssetBalance)
168+ let newClaimedIdoAssetAmount = ((claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) + priceAssetBalancePriceAssetDecimals)
165169 if ((0 > newRemainingAmount))
166170 then throw("invalid math")
167171 else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight))
225229 let periodLength = value(getInteger(keyPeriodLength()))
226230 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
227231 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
228- let $t01192013790 = if ((currentPeriod > 0))
232+ let $t01224314113 = if ((currentPeriod > 0))
229233 then {
230234 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod)))
231235 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod)))
232- let $t01218012885 = if ((height > lastPeriodEndHeight))
236+ let $t01250313208 = if ((height > lastPeriodEndHeight))
233237 then {
234238 let updatedCurrentPeriod = (currentPeriod + 1)
235239 let periodStart = if ((height > (lastPeriodEndHeight + periodLength)))
244248 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
245249 }
246250 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
247- let updatedCurrentPeriod = $t01218012885._1
248- let periodStart = $t01218012885._2
249- let periodEnd = $t01218012885._3
251+ let updatedCurrentPeriod = $t01250313208._1
252+ let periodStart = $t01250313208._2
253+ let periodEnd = $t01250313208._3
250254 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
251255 }
252256 else if (zeroPeriodEndHeighIsDefined)
253257 then {
254258 let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
255259 let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
256- let $t01314013522 = if ((height > zeroPeriodEndHeight))
260+ let $t01346313845 = if ((height > zeroPeriodEndHeight))
257261 then {
258262 let updatedCurrentPeriod = (currentPeriod + 1)
259263 let periodStart = (zeroPeriodEndHeight + 1)
261265 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
262266 }
263267 else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
264- let updatedCurrentPeriod = $t01314013522._1
265- let periodStart = $t01314013522._2
266- let periodEnd = $t01314013522._3
268+ let updatedCurrentPeriod = $t01346313845._1
269+ let periodStart = $t01346313845._2
270+ let periodEnd = $t01346313845._3
267271 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
268272 }
269273 else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
270- let updatedCurrentPeriod = $t01192013790._1
271- let periodStart = $t01192013790._2
272- let periodEnd = $t01192013790._3
274+ let updatedCurrentPeriod = $t01224314113._1
275+ let periodStart = $t01224314113._2
276+ let periodEnd = $t01224314113._3
273277 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
274278 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
275279 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
276280 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
277281 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
278282 let putOneTknV2PriceAssetAmount = scale8
279- let $t01454514798 = {
283+ let $t01486815121 = {
280284 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
281285 if ($isInstanceOf(@, "(Int, Int, Int)"))
282286 then @
283287 else throw("Couldn't cast Any to (Int, Int, Int)")
284288 }
285- if (($t01454514798 == $t01454514798))
289+ if (($t01486815121 == $t01486815121))
286290 then {
287- let bonus = $t01454514798._3
288- let feeAmount = $t01454514798._2
289- let lpAmount = $t01454514798._1
291+ let bonus = $t01486815121._3
292+ let feeAmount = $t01486815121._2
293+ let lpAmount = $t01486815121._1
290294 let usdtAssetId = value(getString(keyUsdtAssetId()))
291- let $t01486015078 = {
295+ let $t01518315401 = {
292296 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
293297 if ($isInstanceOf(@, "(Int, Int)"))
294298 then @
295299 else throw("Couldn't cast Any to (Int, Int)")
296300 }
297- if (($t01486015078 == $t01486015078))
301+ if (($t01518315401 == $t01518315401))
298302 then {
299- let getOneTknV2FeeAmount = $t01486015078._2
300- let usdtAmount = $t01486015078._1
303+ let getOneTknV2FeeAmount = $t01518315401._2
304+ let usdtAmount = $t01518315401._1
301305 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
302306 let endPeriodBlocksLeft = (periodEnd - height)
303307 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
440444 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
441445 let entries = if ((claimedAssetId58 == priceAssetId58))
442446 then {
443- let $t02083421278 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
444- let periodMinAvailableToClaim = $t02083421278._1
445- let periodTotalAvailableToClaim = $t02083421278._2
446- let periodUserAvailableToClaim = $t02083421278._3
447- let totalUserAvailableToClaim = $t02083421278._4
448- let usdtPriceAssetAllowableRatio = $t02083421278._5
449- let currentUsdtPriceAssetRatio = $t02083421278._6
450- let endPeriodBlocksLeft = $t02083421278._7
451- let updatedCurrentPeriod = $t02083421278._8
452- let periodStart = $t02083421278._9
453- let periodEnd = $t02083421278._10
447+ let $t02115721601 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
448+ let periodMinAvailableToClaim = $t02115721601._1
449+ let periodTotalAvailableToClaim = $t02115721601._2
450+ let periodUserAvailableToClaim = $t02115721601._3
451+ let totalUserAvailableToClaim = $t02115721601._4
452+ let usdtPriceAssetAllowableRatio = $t02115721601._5
453+ let currentUsdtPriceAssetRatio = $t02115721601._6
454+ let endPeriodBlocksLeft = $t02115721601._7
455+ let updatedCurrentPeriod = $t02115721601._8
456+ let periodStart = $t02115721601._9
457+ let periodEnd = $t02115721601._10
454458 let checks = [if ((periodUserAvailableToClaim > 0))
455459 then true
456460 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
513517 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
514518 let priceAssetBalanceIdoDecimals = (priceAssetBalance * 100)
515519 let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceIdoDecimals)
516- let $t02736827780 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
517- let periodMinAvailableToClaim = $t02736827780._1
518- let periodTotalAvailableToClaim = $t02736827780._2
519- let periodUserAvailableToClaim = $t02736827780._3
520- let totalUserAvailableToClaim = $t02736827780._4
521- let usdtPriceAssetAllowableRatio = $t02736827780._5
522- let currentUsdtPriceAssetRatio = $t02736827780._6
523- let endPeriodBlocksLeft = $t02736827780._7
524- let updatedCurrentPeriod = $t02736827780._8
525- let periodStart = $t02736827780._9
526- let periodEnd = $t02736827780._10
520+ let $t02769128103 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
521+ let periodMinAvailableToClaim = $t02769128103._1
522+ let periodTotalAvailableToClaim = $t02769128103._2
523+ let periodUserAvailableToClaim = $t02769128103._3
524+ let totalUserAvailableToClaim = $t02769128103._4
525+ let usdtPriceAssetAllowableRatio = $t02769128103._5
526+ let currentUsdtPriceAssetRatio = $t02769128103._6
527+ let endPeriodBlocksLeft = $t02769128103._7
528+ let updatedCurrentPeriod = $t02769128103._8
529+ let periodStart = $t02769128103._9
530+ let periodEnd = $t02769128103._10
527531 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
528532 let userTotalPriceAssetClaimed = (parseIntValue(readInvestorArrayOrFail(userAddress58)[IdxInvClaimedPriceAssetAmount]) - priceAssetBalance)
529533 let resultString = if ((height > currentPeriodEndHeight))
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,priceAssetBalance) = {
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])
163+ let cfgArray = readConfigArray()
164+ let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
165+ let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals
166+ let priceAssetBalancePriceAssetDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN))
163167 let newClaimedPriceAssetAmount = ((claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement]) - priceAssetBalance)
164- let newClaimedIdoAssetAmount = ((claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) + priceAssetBalance)
168+ let newClaimedIdoAssetAmount = ((claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) + priceAssetBalancePriceAssetDecimals)
165169 if ((0 > newRemainingAmount))
166170 then throw("invalid math")
167171 else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight))
168172 }
169173
170174
171175 func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
172176
173177
174178 func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
175179
176180
177181 func internalClaim (claimedAssetId58,userAddress,txId) = {
178182 let cfgArray = readConfigArray()
179183 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
180184 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
181185 let claimEnd = (claimStart + claimDuration)
182186 let price = parseIntValue(cfgArray[IdxCfgPrice])
183187 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
184188 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
185189 let idoAssetId = fromBase58String(idoAssetId58)
186190 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
187191 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
188192 let priceAssetId = fromBase58String(priceAssetId58)
189193 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
190194 let userAddress58 = toString(userAddress)
191195 let origInvestArray = readInvestorArrayOrFail(userAddress58)
192196 let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount])
193197 let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight])
194198 let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP))
195199 then claimStart
196200 else investLastClaimedHeightTMP
197201 let newClaimPeriodHeight = if ((height > claimEnd))
198202 then claimEnd
199203 else if ((claimStart > height))
200204 then claimStart
201205 else height
202206 let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight)
203207 let claimingPriceAssetAmount = fraction(investTotalAmount, claimingBlocks, claimDuration)
204208 let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult)
205209 let isUSDN = (claimedAssetId58 == priceAssetId58)
206210 let isUSDNClaimDisabled = valueOrElse(getBoolean(keyUSDNClaimDisabled()), false)
207211 let checks = [if (!(if (isUSDN)
208212 then isUSDNClaimDisabled
209213 else false))
210214 then true
211215 else throw("USDN claim is disabled")]
212216 if ((checks == checks))
213217 then if ((claimedAssetId58 == priceAssetId58))
214218 then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
215219 else if ((claimedAssetId58 == idoAssetId58))
216220 then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
217221 else throw(("unsupported assetId: " + claimedAssetId58))
218222 else throw("Strict value is not equal to itself.")
219223 }
220224
221225
222226 func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = {
223227 let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
224228 let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
225229 let periodLength = value(getInteger(keyPeriodLength()))
226230 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
227231 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
228- let $t01192013790 = if ((currentPeriod > 0))
232+ let $t01224314113 = if ((currentPeriod > 0))
229233 then {
230234 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod)))
231235 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod)))
232- let $t01218012885 = if ((height > lastPeriodEndHeight))
236+ let $t01250313208 = if ((height > lastPeriodEndHeight))
233237 then {
234238 let updatedCurrentPeriod = (currentPeriod + 1)
235239 let periodStart = if ((height > (lastPeriodEndHeight + periodLength)))
236240 then {
237241 let blocksToLastPeriodStart = ((height - lastPeriodEndHeight) % periodLength)
238242 if ((blocksToLastPeriodStart == 0))
239243 then ((height - periodLength) + 1)
240244 else (height - blocksToLastPeriodStart)
241245 }
242246 else (lastPeriodEndHeight + 1)
243247 let periodEnd = ((periodStart + periodLength) - 1)
244248 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
245249 }
246250 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
247- let updatedCurrentPeriod = $t01218012885._1
248- let periodStart = $t01218012885._2
249- let periodEnd = $t01218012885._3
251+ let updatedCurrentPeriod = $t01250313208._1
252+ let periodStart = $t01250313208._2
253+ let periodEnd = $t01250313208._3
250254 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
251255 }
252256 else if (zeroPeriodEndHeighIsDefined)
253257 then {
254258 let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
255259 let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
256- let $t01314013522 = if ((height > zeroPeriodEndHeight))
260+ let $t01346313845 = if ((height > zeroPeriodEndHeight))
257261 then {
258262 let updatedCurrentPeriod = (currentPeriod + 1)
259263 let periodStart = (zeroPeriodEndHeight + 1)
260264 let periodEnd = ((periodStart + periodLength) - 1)
261265 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
262266 }
263267 else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
264- let updatedCurrentPeriod = $t01314013522._1
265- let periodStart = $t01314013522._2
266- let periodEnd = $t01314013522._3
268+ let updatedCurrentPeriod = $t01346313845._1
269+ let periodStart = $t01346313845._2
270+ let periodEnd = $t01346313845._3
267271 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
268272 }
269273 else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
270- let updatedCurrentPeriod = $t01192013790._1
271- let periodStart = $t01192013790._2
272- let periodEnd = $t01192013790._3
274+ let updatedCurrentPeriod = $t01224314113._1
275+ let periodStart = $t01224314113._2
276+ let periodEnd = $t01224314113._3
273277 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
274278 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
275279 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
276280 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
277281 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
278282 let putOneTknV2PriceAssetAmount = scale8
279- let $t01454514798 = {
283+ let $t01486815121 = {
280284 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
281285 if ($isInstanceOf(@, "(Int, Int, Int)"))
282286 then @
283287 else throw("Couldn't cast Any to (Int, Int, Int)")
284288 }
285- if (($t01454514798 == $t01454514798))
289+ if (($t01486815121 == $t01486815121))
286290 then {
287- let bonus = $t01454514798._3
288- let feeAmount = $t01454514798._2
289- let lpAmount = $t01454514798._1
291+ let bonus = $t01486815121._3
292+ let feeAmount = $t01486815121._2
293+ let lpAmount = $t01486815121._1
290294 let usdtAssetId = value(getString(keyUsdtAssetId()))
291- let $t01486015078 = {
295+ let $t01518315401 = {
292296 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
293297 if ($isInstanceOf(@, "(Int, Int)"))
294298 then @
295299 else throw("Couldn't cast Any to (Int, Int)")
296300 }
297- if (($t01486015078 == $t01486015078))
301+ if (($t01518315401 == $t01518315401))
298302 then {
299- let getOneTknV2FeeAmount = $t01486015078._2
300- let usdtAmount = $t01486015078._1
303+ let getOneTknV2FeeAmount = $t01518315401._2
304+ let usdtAmount = $t01518315401._1
301305 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
302306 let endPeriodBlocksLeft = (periodEnd - height)
303307 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
304308 }
305309 else throw("Strict value is not equal to itself.")
306310 }
307311 else throw("Strict value is not equal to itself.")
308312 }
309313
310314
311315 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
312316 case s: String =>
313317 fromBase58String(s)
314318 case _: Unit =>
315319 unit
316320 case _ =>
317321 throw("Match error")
318322 }
319323
320324
321325 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
322326 case s: String =>
323327 fromBase58String(s)
324328 case _: Unit =>
325329 unit
326330 case _ =>
327331 throw("Match error")
328332 }
329333
330334
331335 func mustManager (i) = {
332336 let pd = throw("Permission denied")
333337 match managerPublicKeyOrUnit() {
334338 case pk: ByteVector =>
335339 if ((i.callerPublicKey == pk))
336340 then true
337341 else pd
338342 case _: Unit =>
339343 if ((i.caller == this))
340344 then true
341345 else pd
342346 case _ =>
343347 throw("Match error")
344348 }
345349 }
346350
347351
348352 @Callable(i)
349353 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
350354 let priceMult = ((100 * 1000) * 1000)
351355 let idoEnd = (idoStart + idoDuration)
352356 if (isDefined(getString(keyConfig())))
353357 then throw("already initialized")
354358 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
355359 then throw("not authorized")
356360 else if ((size(i.payments) != 1))
357361 then throw("exactly 1 payment must be attached")
358362 else if ((idoEnd >= claimStart))
359363 then throw("claimStart must be greater than idoEnd")
360364 else {
361365 let pmt = value(i.payments[0])
362366 let idoAssetId = value(pmt.assetId)
363367 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
364368 let idoAssetId58 = toBase58String(idoAssetId)
365369 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
366370 let priceAssetId = fromBase58String(priceAssetId58)
367371 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
368372 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
369373 let origTotalsArray = readTotalsArrayOrDefault()
370374 let totalsDiff = [0, 0, 0, 0]
371375 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart, 0)]
372376 }
373377 }
374378
375379
376380
377381 @Callable(i)
378382 func invest () = {
379383 let cfgArray = readConfigArray()
380384 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
381385 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
382386 let idoEnd = (idoStart + idoDuration)
383387 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
384388 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
385389 let price = parseIntValue(cfgArray[IdxCfgPrice])
386390 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
387391 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
388392 let idoAssetId = fromBase58String(idoAssetId58)
389393 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
390394 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
391395 let priceAssetId = fromBase58String(priceAssetId58)
392396 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
393397 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
394398 let userAddress = toString(i.caller)
395399 if ((idoStart > height))
396400 then throw("ido has not been started yet")
397401 else if ((height > idoEnd))
398402 then throw("ido has been already ended")
399403 else if ((size(i.payments) != 1))
400404 then throw("exactly 1 payment is expected")
401405 else {
402406 let pmt = value(i.payments[0])
403407 let pmtAssetId = value(pmt.assetId)
404408 let pmtAmount = pmt.amount
405409 if ((pmtAssetId != priceAssetId))
406410 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
407411 else {
408412 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
409413 let origTotalsArray = readTotalsArrayOrDefault()
410414 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
411415 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
412416 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
413417 then throw("IDO asset has been - sold consider to use smaller payment")
414418 else {
415419 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
416420 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart, 0), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart, 0), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
417421 }
418422 }
419423 }
420424 }
421425
422426
423427
424428 @Callable(i)
425429 func claim (claimedAssetId58,userAddress58) = {
426430 let callerAddress58 = toString(i.caller)
427431 if ((userAddress58 != callerAddress58))
428432 then throw("not authorized")
429433 else {
430434 let cfgArray = readConfigArray()
431435 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
432436 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
433437 let totalsDiff = claimResultTuple._1
434438 let outAmount = claimResultTuple._2
435439 let outAssetId = claimResultTuple._3
436440 let origInvestArray = claimResultTuple._4
437441 let newClaimPeriodHeight = claimResultTuple._5
438442 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
439443 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
440444 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
441445 let entries = if ((claimedAssetId58 == priceAssetId58))
442446 then {
443- let $t02083421278 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
444- let periodMinAvailableToClaim = $t02083421278._1
445- let periodTotalAvailableToClaim = $t02083421278._2
446- let periodUserAvailableToClaim = $t02083421278._3
447- let totalUserAvailableToClaim = $t02083421278._4
448- let usdtPriceAssetAllowableRatio = $t02083421278._5
449- let currentUsdtPriceAssetRatio = $t02083421278._6
450- let endPeriodBlocksLeft = $t02083421278._7
451- let updatedCurrentPeriod = $t02083421278._8
452- let periodStart = $t02083421278._9
453- let periodEnd = $t02083421278._10
447+ let $t02115721601 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
448+ let periodMinAvailableToClaim = $t02115721601._1
449+ let periodTotalAvailableToClaim = $t02115721601._2
450+ let periodUserAvailableToClaim = $t02115721601._3
451+ let totalUserAvailableToClaim = $t02115721601._4
452+ let usdtPriceAssetAllowableRatio = $t02115721601._5
453+ let currentUsdtPriceAssetRatio = $t02115721601._6
454+ let endPeriodBlocksLeft = $t02115721601._7
455+ let updatedCurrentPeriod = $t02115721601._8
456+ let periodStart = $t02115721601._9
457+ let periodEnd = $t02115721601._10
454458 let checks = [if ((periodUserAvailableToClaim > 0))
455459 then true
456460 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
457461 then true
458462 else throwErr("unavailable to claim because total period allowance reached"), if ((periodMinAvailableToClaim > 0))
459463 then true
460464 else throwErr("nothing to claim"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio))
461465 then true
462466 else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")]
463467 if ((checks == checks))
464468 then {
465469 let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim)
466470 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
467471 let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
468472 then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
469473 else {
470474 let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
471475 [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, 0), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, 0), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)]
472476 }
473477 $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)
474478 }
475479 else throw("Strict value is not equal to itself.")
476480 }
477481 else $Tuple2([ScriptTransfer(i.caller, (outAmount + priceAssetBalance), outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), 0), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, priceAssetBalance), ClaimOperationHistoryEntry(userAddress58, (claimedPriceAmountFromDiff + priceAssetBalance), claimedIdoAssetAmountFromDiff, i.transactionId)], unit)
478482 entries
479483 }
480484 }
481485
482486
483487
484488 @Callable(i)
485489 func claimREADONLY (claimedAssetId58,userAddress58) = {
486490 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
487491 let totalsDiff = claimResultTuple._1
488492 let outAmount = claimResultTuple._2
489493 let outAssetId = claimResultTuple._3
490494 let origInvestArray = claimResultTuple._4
491495 let newClaimPeriodHeight = claimResultTuple._5
492496 let availableToClaimArray = claimResultTuple._6
493497 let availablePriceAmountToClaim = availableToClaimArray[0]
494498 let availableIdoAmountToClaim = availableToClaimArray[1]
495499 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
496500 }
497501
498502
499503
500504 @Callable(i)
501505 func claimV2READONLY (claimedAssetId58,userAddress58) = {
502506 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
503507 let totalsDiff = claimResultTuple._1
504508 let outAmount = claimResultTuple._2
505509 let outAssetId = claimResultTuple._3
506510 let origInvestArray = claimResultTuple._4
507511 let newClaimPeriodHeight = claimResultTuple._5
508512 let availableToClaimArray = claimResultTuple._6
509513 let availablePriceAmountToClaim = availableToClaimArray[0]
510514 let availableIdoAmountToClaim = availableToClaimArray[1]
511515 let cfgArray = readConfigArray()
512516 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
513517 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
514518 let priceAssetBalanceIdoDecimals = (priceAssetBalance * 100)
515519 let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceIdoDecimals)
516- let $t02736827780 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
517- let periodMinAvailableToClaim = $t02736827780._1
518- let periodTotalAvailableToClaim = $t02736827780._2
519- let periodUserAvailableToClaim = $t02736827780._3
520- let totalUserAvailableToClaim = $t02736827780._4
521- let usdtPriceAssetAllowableRatio = $t02736827780._5
522- let currentUsdtPriceAssetRatio = $t02736827780._6
523- let endPeriodBlocksLeft = $t02736827780._7
524- let updatedCurrentPeriod = $t02736827780._8
525- let periodStart = $t02736827780._9
526- let periodEnd = $t02736827780._10
520+ let $t02769128103 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
521+ let periodMinAvailableToClaim = $t02769128103._1
522+ let periodTotalAvailableToClaim = $t02769128103._2
523+ let periodUserAvailableToClaim = $t02769128103._3
524+ let totalUserAvailableToClaim = $t02769128103._4
525+ let usdtPriceAssetAllowableRatio = $t02769128103._5
526+ let currentUsdtPriceAssetRatio = $t02769128103._6
527+ let endPeriodBlocksLeft = $t02769128103._7
528+ let updatedCurrentPeriod = $t02769128103._8
529+ let periodStart = $t02769128103._9
530+ let periodEnd = $t02769128103._10
527531 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
528532 let userTotalPriceAssetClaimed = (parseIntValue(readInvestorArrayOrFail(userAddress58)[IdxInvClaimedPriceAssetAmount]) - priceAssetBalance)
529533 let resultString = if ((height > currentPeriodEndHeight))
530534 then {
531535 let periodLenght = value(getInteger(keyPeriodLength()))
532536 let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
533537 let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
534538 makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght), toString(userTotalPriceAssetClaimed)], SEP)
535539 }
536540 else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft), toString(userTotalPriceAssetClaimed)], SEP)
537541 $Tuple2(nil, resultString)
538542 }
539543
540544
541545
542546 @Callable(i)
543547 func setManager (pendingManagerPublicKey) = {
544548 let checkCaller = mustManager(i)
545549 if ((checkCaller == checkCaller))
546550 then {
547551 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
548552 if ((checkManagerPublicKey == checkManagerPublicKey))
549553 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
550554 else throw("Strict value is not equal to itself.")
551555 }
552556 else throw("Strict value is not equal to itself.")
553557 }
554558
555559
556560
557561 @Callable(i)
558562 func confirmManager () = {
559563 let pm = pendingManagerPublicKeyOrUnit()
560564 let hasPM = if (isDefined(pm))
561565 then true
562566 else throw("No pending manager")
563567 if ((hasPM == hasPM))
564568 then {
565569 let checkPM = if ((i.callerPublicKey == value(pm)))
566570 then true
567571 else throw("You are not pending manager")
568572 if ((checkPM == checkPM))
569573 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
570574 else throw("Strict value is not equal to itself.")
571575 }
572576 else throw("Strict value is not equal to itself.")
573577 }
574578
575579
576580 @Verifier(tx)
577581 func verify () = {
578582 let targetPublicKey = match managerPublicKeyOrUnit() {
579583 case pk: ByteVector =>
580584 pk
581585 case _: Unit =>
582586 tx.senderPublicKey
583587 case _ =>
584588 throw("Match error")
585589 }
586590 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
587591 }
588592

github/deemru/w8io/169f3d6 
112.26 ms