tx · GuP8Xv9mLH4Nfg6XJ7qwX6jG8MxyaMe8a4uKGCrTnG94

3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv:  -0.02600000 Waves

2022.11.03 15:29 [2300939] smart account 3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv > SELF 0.00000000 Waves

{ "type": 13, "id": "GuP8Xv9mLH4Nfg6XJ7qwX6jG8MxyaMe8a4uKGCrTnG94", "fee": 2600000, "feeAssetId": null, "timestamp": 1667478592466, "version": 1, "sender": "3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv", "senderPublicKey": "39YkRD2qWXTcdNBr4CbDnm8g8SAB2FKVaDeGYahcFHHx", "proofs": [ "33qJ6SEP5YTP6rcSRdpF9yBXtZfx6qHWtskUMj8i3feBQLn8QfnRDaWTG2M6rVXH6C38qJ7QQAkKHmgcZJYYGEUf" ], "script": "base64:AAIFAAAAAAAAD0gIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhR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AAAAAgkBAAAAAmFCAAAAAAkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAJjVgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAACYUMAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACY1kBAAAAAmNaAAAAAAQAAAACZGEEAAAAAmNkCQEAAAACY2MAAAAAAwkAAAEAAAACBQAAAAJjZAIAAAAKQnl0ZVZlY3RvcgQAAAACY2oFAAAAAmNkBQAAAAJjagMJAAABAAAAAgUAAAACY2QCAAAABFVuaXQIBQAAAAJjWQAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmNZAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACY1kAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJkYbOZp1U=", "chainId": 84, "height": 2300939, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GBouABYyNQ5qo27b5P8iaJYzD4HchJFMfEodyP7GNdtZ Next: Gt88UggJwxKtQUPsE15emTGt1vg7P8xeJqxLfP4A9anP Diff:
OldNewDifferences
211211 else throw("USDN claim is disabled")]
212212 if ((checks == checks))
213213 then if ((claimedAssetId58 == priceAssetId58))
214- then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
214+ then {
215+ let priceAssetDecimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
216+ let claimingPriceAssetAmountPriceAssetDecimals = fraction(claimingPriceAssetAmount, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN))
217+ $Tuple6([0, -(claimingPriceAssetAmountPriceAssetDecimals), claimingPriceAssetAmountPriceAssetDecimals, 0], claimingPriceAssetAmountPriceAssetDecimals, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmountPriceAssetDecimals, claimingIdoAssetAmount])
218+ }
215219 else if ((claimedAssetId58 == idoAssetId58))
216220 then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
217221 else throw(("unsupported assetId: " + claimedAssetId58))
225229 let periodLength = value(getInteger(keyPeriodLength()))
226230 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
227231 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
228- let $t01183513705 = if ((currentPeriod > 0))
232+ let $t01215314023 = if ((currentPeriod > 0))
229233 then {
230234 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod)))
231235 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod)))
232- let $t01209512800 = if ((height > lastPeriodEndHeight))
236+ let $t01241313118 = 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 = $t01209512800._1
248- let periodStart = $t01209512800._2
249- let periodEnd = $t01209512800._3
251+ let updatedCurrentPeriod = $t01241313118._1
252+ let periodStart = $t01241313118._2
253+ let periodEnd = $t01241313118._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 $t01305513437 = if ((height > zeroPeriodEndHeight))
260+ let $t01337313755 = 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 = $t01305513437._1
265- let periodStart = $t01305513437._2
266- let periodEnd = $t01305513437._3
268+ let updatedCurrentPeriod = $t01337313755._1
269+ let periodStart = $t01337313755._2
270+ let periodEnd = $t01337313755._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 = $t01183513705._1
271- let periodStart = $t01183513705._2
272- let periodEnd = $t01183513705._3
274+ let updatedCurrentPeriod = $t01215314023._1
275+ let periodStart = $t01215314023._2
276+ let periodEnd = $t01215314023._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])
277- let sum = (outAmount + priceAssetBalance)
278- let err = throw(makeString([toString(outAmount), toString(priceAssetBalance), toString(sum), toString(periodTotalAvailableToClaim), toString(periodUserAvailableToClaim)], SEP))
279- if ((err == err))
281+ let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
282+ let putOneTknV2PriceAssetAmount = scale8
283+ let $t01477815031 = {
284+ let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
285+ if ($isInstanceOf(@, "(Int, Int, Int)"))
286+ then @
287+ else throw("Couldn't cast Any to (Int, Int, Int)")
288+ }
289+ if (($t01477815031 == $t01477815031))
280290 then {
281- let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
282- let putOneTknV2PriceAssetAmount = scale8
283- let $t01471414967 = {
284- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
285- if ($isInstanceOf(@, "(Int, Int, Int)"))
291+ let bonus = $t01477815031._3
292+ let feeAmount = $t01477815031._2
293+ let lpAmount = $t01477815031._1
294+ let usdtAssetId = value(getString(keyUsdtAssetId()))
295+ let $t01509315311 = {
296+ let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
297+ if ($isInstanceOf(@, "(Int, Int)"))
286298 then @
287- else throw("Couldn't cast Any to (Int, Int, Int)")
299+ else throw("Couldn't cast Any to (Int, Int)")
288300 }
289- if (($t01471414967 == $t01471414967))
301+ if (($t01509315311 == $t01509315311))
290302 then {
291- let bonus = $t01471414967._3
292- let feeAmount = $t01471414967._2
293- let lpAmount = $t01471414967._1
294- let usdtAssetId = value(getString(keyUsdtAssetId()))
295- let $t01502915247 = {
296- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
297- if ($isInstanceOf(@, "(Int, Int)"))
298- then @
299- else throw("Couldn't cast Any to (Int, Int)")
300- }
301- if (($t01502915247 == $t01502915247))
302- then {
303- let getOneTknV2FeeAmount = $t01502915247._2
304- let usdtAmount = $t01502915247._1
305- let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
306- let endPeriodBlocksLeft = (periodEnd - height)
307- $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
308- }
309- else throw("Strict value is not equal to itself.")
303+ let getOneTknV2FeeAmount = $t01509315311._2
304+ let usdtAmount = $t01509315311._1
305+ let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
306+ let endPeriodBlocksLeft = (periodEnd - height)
307+ $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
310308 }
311309 else throw("Strict value is not equal to itself.")
312310 }
445443 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
446444 let entries = if ((claimedAssetId58 == priceAssetId58))
447445 then {
448- let $t02090321347 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
449- let periodMinAvailableToClaim = $t02090321347._1
450- let periodTotalAvailableToClaim = $t02090321347._2
451- let periodUserAvailableToClaim = $t02090321347._3
452- let totalUserAvailableToClaim = $t02090321347._4
453- let usdtPriceAssetAllowableRatio = $t02090321347._5
454- let currentUsdtPriceAssetRatio = $t02090321347._6
455- let endPeriodBlocksLeft = $t02090321347._7
456- let updatedCurrentPeriod = $t02090321347._8
457- let periodStart = $t02090321347._9
458- let periodEnd = $t02090321347._10
446+ let $t02096721411 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
447+ let periodMinAvailableToClaim = $t02096721411._1
448+ let periodTotalAvailableToClaim = $t02096721411._2
449+ let periodUserAvailableToClaim = $t02096721411._3
450+ let totalUserAvailableToClaim = $t02096721411._4
451+ let usdtPriceAssetAllowableRatio = $t02096721411._5
452+ let currentUsdtPriceAssetRatio = $t02096721411._6
453+ let endPeriodBlocksLeft = $t02096721411._7
454+ let updatedCurrentPeriod = $t02096721411._8
455+ let periodStart = $t02096721411._9
456+ let periodEnd = $t02096721411._10
459457 let checks = [if ((periodUserAvailableToClaim > 0))
460458 then true
461459 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
472470 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
473471 let priceAssetDecimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
474472 let periodMinAvailableToClaimPriceAssetDecimals = fraction(periodMinAvailableToClaim, pow(10, 0, priceAssetDecimals, 0, 0, DOWN), scale8)
475- let error = throw(makeString([toString(priceAssetDecimals), toString(periodMinAvailableToClaim), toString(periodMinAvailableToClaimPriceAssetDecimals)], SEP))
476- if ((error == error))
477- then {
478- let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
479- then [ScriptTransfer(i.caller, periodMinAvailableToClaimPriceAssetDecimals, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
480- else {
481- let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
473+ let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
474+ then [ScriptTransfer(i.caller, periodMinAvailableToClaimPriceAssetDecimals, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
475+ else {
476+ let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
482477 [ScriptTransfer(i.caller, periodMinAvailableToClaimPriceAssetDecimals, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)]
483- }
484- $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, periodMinAvailableToClaimPriceAssetDecimals, claimedIdoAssetAmountFromDiff, i.transactionId)] ++ entries), unit)
485478 }
486- else throw("Strict value is not equal to itself.")
479+ $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, periodMinAvailableToClaimPriceAssetDecimals, claimedIdoAssetAmountFromDiff, i.transactionId)] ++ entries), unit)
487480 }
488481 else throw("Strict value is not equal to itself.")
489482 }
525518 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
526519 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
527520 let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalance)
528- let $t02787128283 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
529- let periodMinAvailableToClaim = $t02787128283._1
530- let periodTotalAvailableToClaim = $t02787128283._2
531- let periodUserAvailableToClaim = $t02787128283._3
532- let totalUserAvailableToClaim = $t02787128283._4
533- let usdtPriceAssetAllowableRatio = $t02787128283._5
534- let currentUsdtPriceAssetRatio = $t02787128283._6
535- let endPeriodBlocksLeft = $t02787128283._7
536- let updatedCurrentPeriod = $t02787128283._8
537- let periodStart = $t02787128283._9
538- let periodEnd = $t02787128283._10
521+ let $t02774128153 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
522+ let periodMinAvailableToClaim = $t02774128153._1
523+ let periodTotalAvailableToClaim = $t02774128153._2
524+ let periodUserAvailableToClaim = $t02774128153._3
525+ let totalUserAvailableToClaim = $t02774128153._4
526+ let usdtPriceAssetAllowableRatio = $t02774128153._5
527+ let currentUsdtPriceAssetRatio = $t02774128153._6
528+ let endPeriodBlocksLeft = $t02774128153._7
529+ let updatedCurrentPeriod = $t02774128153._8
530+ let periodStart = $t02774128153._9
531+ let periodEnd = $t02774128153._10
539532 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
540533 let decimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
541534 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) = {
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))
214- then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
214+ then {
215+ let priceAssetDecimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
216+ let claimingPriceAssetAmountPriceAssetDecimals = fraction(claimingPriceAssetAmount, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN))
217+ $Tuple6([0, -(claimingPriceAssetAmountPriceAssetDecimals), claimingPriceAssetAmountPriceAssetDecimals, 0], claimingPriceAssetAmountPriceAssetDecimals, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmountPriceAssetDecimals, claimingIdoAssetAmount])
218+ }
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 $t01183513705 = if ((currentPeriod > 0))
232+ let $t01215314023 = if ((currentPeriod > 0))
229233 then {
230234 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod)))
231235 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod)))
232- let $t01209512800 = if ((height > lastPeriodEndHeight))
236+ let $t01241313118 = 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 = $t01209512800._1
248- let periodStart = $t01209512800._2
249- let periodEnd = $t01209512800._3
251+ let updatedCurrentPeriod = $t01241313118._1
252+ let periodStart = $t01241313118._2
253+ let periodEnd = $t01241313118._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 $t01305513437 = if ((height > zeroPeriodEndHeight))
260+ let $t01337313755 = 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 = $t01305513437._1
265- let periodStart = $t01305513437._2
266- let periodEnd = $t01305513437._3
268+ let updatedCurrentPeriod = $t01337313755._1
269+ let periodStart = $t01337313755._2
270+ let periodEnd = $t01337313755._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 = $t01183513705._1
271- let periodStart = $t01183513705._2
272- let periodEnd = $t01183513705._3
274+ let updatedCurrentPeriod = $t01215314023._1
275+ let periodStart = $t01215314023._2
276+ let periodEnd = $t01215314023._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])
277- let sum = (outAmount + priceAssetBalance)
278- let err = throw(makeString([toString(outAmount), toString(priceAssetBalance), toString(sum), toString(periodTotalAvailableToClaim), toString(periodUserAvailableToClaim)], SEP))
279- if ((err == err))
281+ let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
282+ let putOneTknV2PriceAssetAmount = scale8
283+ let $t01477815031 = {
284+ let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
285+ if ($isInstanceOf(@, "(Int, Int, Int)"))
286+ then @
287+ else throw("Couldn't cast Any to (Int, Int, Int)")
288+ }
289+ if (($t01477815031 == $t01477815031))
280290 then {
281- let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
282- let putOneTknV2PriceAssetAmount = scale8
283- let $t01471414967 = {
284- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
285- if ($isInstanceOf(@, "(Int, Int, Int)"))
291+ let bonus = $t01477815031._3
292+ let feeAmount = $t01477815031._2
293+ let lpAmount = $t01477815031._1
294+ let usdtAssetId = value(getString(keyUsdtAssetId()))
295+ let $t01509315311 = {
296+ let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
297+ if ($isInstanceOf(@, "(Int, Int)"))
286298 then @
287- else throw("Couldn't cast Any to (Int, Int, Int)")
299+ else throw("Couldn't cast Any to (Int, Int)")
288300 }
289- if (($t01471414967 == $t01471414967))
301+ if (($t01509315311 == $t01509315311))
290302 then {
291- let bonus = $t01471414967._3
292- let feeAmount = $t01471414967._2
293- let lpAmount = $t01471414967._1
294- let usdtAssetId = value(getString(keyUsdtAssetId()))
295- let $t01502915247 = {
296- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
297- if ($isInstanceOf(@, "(Int, Int)"))
298- then @
299- else throw("Couldn't cast Any to (Int, Int)")
300- }
301- if (($t01502915247 == $t01502915247))
302- then {
303- let getOneTknV2FeeAmount = $t01502915247._2
304- let usdtAmount = $t01502915247._1
305- let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
306- let endPeriodBlocksLeft = (periodEnd - height)
307- $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
308- }
309- else throw("Strict value is not equal to itself.")
303+ let getOneTknV2FeeAmount = $t01509315311._2
304+ let usdtAmount = $t01509315311._1
305+ let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
306+ let endPeriodBlocksLeft = (periodEnd - height)
307+ $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
310308 }
311309 else throw("Strict value is not equal to itself.")
312310 }
313311 else throw("Strict value is not equal to itself.")
314312 }
315313
316314
317315 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
318316 case s: String =>
319317 fromBase58String(s)
320318 case _: Unit =>
321319 unit
322320 case _ =>
323321 throw("Match error")
324322 }
325323
326324
327325 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
328326 case s: String =>
329327 fromBase58String(s)
330328 case _: Unit =>
331329 unit
332330 case _ =>
333331 throw("Match error")
334332 }
335333
336334
337335 func mustManager (i) = {
338336 let pd = throw("Permission denied")
339337 match managerPublicKeyOrUnit() {
340338 case pk: ByteVector =>
341339 if ((i.callerPublicKey == pk))
342340 then true
343341 else pd
344342 case _: Unit =>
345343 if ((i.caller == this))
346344 then true
347345 else pd
348346 case _ =>
349347 throw("Match error")
350348 }
351349 }
352350
353351
354352 @Callable(i)
355353 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
356354 let priceMult = ((100 * 1000) * 1000)
357355 let idoEnd = (idoStart + idoDuration)
358356 if (isDefined(getString(keyConfig())))
359357 then throw("already initialized")
360358 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
361359 then throw("not authorized")
362360 else if ((size(i.payments) != 1))
363361 then throw("exactly 1 payment must be attached")
364362 else if ((idoEnd >= claimStart))
365363 then throw("claimStart must be greater than idoEnd")
366364 else {
367365 let pmt = value(i.payments[0])
368366 let idoAssetId = value(pmt.assetId)
369367 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
370368 let idoAssetId58 = toBase58String(idoAssetId)
371369 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
372370 let priceAssetId = fromBase58String(priceAssetId58)
373371 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
374372 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
375373 let origTotalsArray = readTotalsArrayOrDefault()
376374 let totalsDiff = [0, 0, 0, 0]
377375 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)]
378376 }
379377 }
380378
381379
382380
383381 @Callable(i)
384382 func invest () = {
385383 let cfgArray = readConfigArray()
386384 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
387385 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
388386 let idoEnd = (idoStart + idoDuration)
389387 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
390388 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
391389 let price = parseIntValue(cfgArray[IdxCfgPrice])
392390 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
393391 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
394392 let idoAssetId = fromBase58String(idoAssetId58)
395393 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
396394 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
397395 let priceAssetId = fromBase58String(priceAssetId58)
398396 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
399397 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
400398 let userAddress = toString(i.caller)
401399 if ((idoStart > height))
402400 then throw("ido has not been started yet")
403401 else if ((height > idoEnd))
404402 then throw("ido has been already ended")
405403 else if ((size(i.payments) != 1))
406404 then throw("exactly 1 payment is expected")
407405 else {
408406 let pmt = value(i.payments[0])
409407 let pmtAssetId = value(pmt.assetId)
410408 let pmtAmount = pmt.amount
411409 if ((pmtAssetId != priceAssetId))
412410 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
413411 else {
414412 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
415413 let origTotalsArray = readTotalsArrayOrDefault()
416414 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
417415 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
418416 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
419417 then throw("IDO asset has been - sold consider to use smaller payment")
420418 else {
421419 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
422420 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
423421 }
424422 }
425423 }
426424 }
427425
428426
429427
430428 @Callable(i)
431429 func claim (claimedAssetId58,userAddress58) = {
432430 let callerAddress58 = toString(i.caller)
433431 if ((userAddress58 != callerAddress58))
434432 then throw("not authorized")
435433 else {
436434 let cfgArray = readConfigArray()
437435 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
438436 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
439437 let totalsDiff = claimResultTuple._1
440438 let outAmount = claimResultTuple._2
441439 let outAssetId = claimResultTuple._3
442440 let origInvestArray = claimResultTuple._4
443441 let newClaimPeriodHeight = claimResultTuple._5
444442 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
445443 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
446444 let entries = if ((claimedAssetId58 == priceAssetId58))
447445 then {
448- let $t02090321347 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
449- let periodMinAvailableToClaim = $t02090321347._1
450- let periodTotalAvailableToClaim = $t02090321347._2
451- let periodUserAvailableToClaim = $t02090321347._3
452- let totalUserAvailableToClaim = $t02090321347._4
453- let usdtPriceAssetAllowableRatio = $t02090321347._5
454- let currentUsdtPriceAssetRatio = $t02090321347._6
455- let endPeriodBlocksLeft = $t02090321347._7
456- let updatedCurrentPeriod = $t02090321347._8
457- let periodStart = $t02090321347._9
458- let periodEnd = $t02090321347._10
446+ let $t02096721411 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
447+ let periodMinAvailableToClaim = $t02096721411._1
448+ let periodTotalAvailableToClaim = $t02096721411._2
449+ let periodUserAvailableToClaim = $t02096721411._3
450+ let totalUserAvailableToClaim = $t02096721411._4
451+ let usdtPriceAssetAllowableRatio = $t02096721411._5
452+ let currentUsdtPriceAssetRatio = $t02096721411._6
453+ let endPeriodBlocksLeft = $t02096721411._7
454+ let updatedCurrentPeriod = $t02096721411._8
455+ let periodStart = $t02096721411._9
456+ let periodEnd = $t02096721411._10
459457 let checks = [if ((periodUserAvailableToClaim > 0))
460458 then true
461459 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
462460 then true
463461 else throwErr("unavailable to claim because total period allowance reached"), if ((periodMinAvailableToClaim > 0))
464462 then true
465463 else throwErr("nothing to claim"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio))
466464 then true
467465 else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")]
468466 if ((checks == checks))
469467 then {
470468 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
471469 let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim)
472470 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
473471 let priceAssetDecimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
474472 let periodMinAvailableToClaimPriceAssetDecimals = fraction(periodMinAvailableToClaim, pow(10, 0, priceAssetDecimals, 0, 0, DOWN), scale8)
475- let error = throw(makeString([toString(priceAssetDecimals), toString(periodMinAvailableToClaim), toString(periodMinAvailableToClaimPriceAssetDecimals)], SEP))
476- if ((error == error))
477- then {
478- let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
479- then [ScriptTransfer(i.caller, periodMinAvailableToClaimPriceAssetDecimals, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
480- else {
481- let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
473+ let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
474+ then [ScriptTransfer(i.caller, periodMinAvailableToClaimPriceAssetDecimals, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
475+ else {
476+ let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
482477 [ScriptTransfer(i.caller, periodMinAvailableToClaimPriceAssetDecimals, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)]
483- }
484- $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, periodMinAvailableToClaimPriceAssetDecimals, claimedIdoAssetAmountFromDiff, i.transactionId)] ++ entries), unit)
485478 }
486- else throw("Strict value is not equal to itself.")
479+ $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, periodMinAvailableToClaimPriceAssetDecimals, claimedIdoAssetAmountFromDiff, i.transactionId)] ++ entries), unit)
487480 }
488481 else throw("Strict value is not equal to itself.")
489482 }
490483 else $Tuple2([ScriptTransfer(i.caller, outAmount, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), 0), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, claimedIdoAssetAmountFromDiff, i.transactionId)], unit)
491484 entries
492485 }
493486 }
494487
495488
496489
497490 @Callable(i)
498491 func claimREADONLY (claimedAssetId58,userAddress58) = {
499492 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
500493 let totalsDiff = claimResultTuple._1
501494 let outAmount = claimResultTuple._2
502495 let outAssetId = claimResultTuple._3
503496 let origInvestArray = claimResultTuple._4
504497 let newClaimPeriodHeight = claimResultTuple._5
505498 let availableToClaimArray = claimResultTuple._6
506499 let availablePriceAmountToClaim = availableToClaimArray[0]
507500 let availableIdoAmountToClaim = availableToClaimArray[1]
508501 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
509502 }
510503
511504
512505
513506 @Callable(i)
514507 func claimV2READONLY (claimedAssetId58,userAddress58) = {
515508 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
516509 let totalsDiff = claimResultTuple._1
517510 let outAmount = claimResultTuple._2
518511 let outAssetId = claimResultTuple._3
519512 let origInvestArray = claimResultTuple._4
520513 let newClaimPeriodHeight = claimResultTuple._5
521514 let availableToClaimArray = claimResultTuple._6
522515 let availablePriceAmountToClaim = availableToClaimArray[0]
523516 let availableIdoAmountToClaim = availableToClaimArray[1]
524517 let cfgArray = readConfigArray()
525518 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
526519 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
527520 let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalance)
528- let $t02787128283 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
529- let periodMinAvailableToClaim = $t02787128283._1
530- let periodTotalAvailableToClaim = $t02787128283._2
531- let periodUserAvailableToClaim = $t02787128283._3
532- let totalUserAvailableToClaim = $t02787128283._4
533- let usdtPriceAssetAllowableRatio = $t02787128283._5
534- let currentUsdtPriceAssetRatio = $t02787128283._6
535- let endPeriodBlocksLeft = $t02787128283._7
536- let updatedCurrentPeriod = $t02787128283._8
537- let periodStart = $t02787128283._9
538- let periodEnd = $t02787128283._10
521+ let $t02774128153 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
522+ let periodMinAvailableToClaim = $t02774128153._1
523+ let periodTotalAvailableToClaim = $t02774128153._2
524+ let periodUserAvailableToClaim = $t02774128153._3
525+ let totalUserAvailableToClaim = $t02774128153._4
526+ let usdtPriceAssetAllowableRatio = $t02774128153._5
527+ let currentUsdtPriceAssetRatio = $t02774128153._6
528+ let endPeriodBlocksLeft = $t02774128153._7
529+ let updatedCurrentPeriod = $t02774128153._8
530+ let periodStart = $t02774128153._9
531+ let periodEnd = $t02774128153._10
539532 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
540533 let decimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
541534 let resultString = if ((height > currentPeriodEndHeight))
542535 then {
543536 let periodLenght = value(getInteger(keyPeriodLength()))
544537 let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
545538 let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
546539 makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght), toString(outAmount), toString(periodMinAvailableToClaim), toString(periodUserAvailableToClaim), toString(decimals)], SEP)
547540 }
548541 else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft), toString(outAmount), toString(periodMinAvailableToClaim), toString(periodUserAvailableToClaim), toString(decimals)], SEP)
549542 $Tuple2(nil, resultString)
550543 }
551544
552545
553546
554547 @Callable(i)
555548 func setManager (pendingManagerPublicKey) = {
556549 let checkCaller = mustManager(i)
557550 if ((checkCaller == checkCaller))
558551 then {
559552 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
560553 if ((checkManagerPublicKey == checkManagerPublicKey))
561554 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
562555 else throw("Strict value is not equal to itself.")
563556 }
564557 else throw("Strict value is not equal to itself.")
565558 }
566559
567560
568561
569562 @Callable(i)
570563 func confirmManager () = {
571564 let pm = pendingManagerPublicKeyOrUnit()
572565 let hasPM = if (isDefined(pm))
573566 then true
574567 else throw("No pending manager")
575568 if ((hasPM == hasPM))
576569 then {
577570 let checkPM = if ((i.callerPublicKey == value(pm)))
578571 then true
579572 else throw("You are not pending manager")
580573 if ((checkPM == checkPM))
581574 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
582575 else throw("Strict value is not equal to itself.")
583576 }
584577 else throw("Strict value is not equal to itself.")
585578 }
586579
587580
588581 @Verifier(tx)
589582 func verify () = {
590583 let targetPublicKey = match managerPublicKeyOrUnit() {
591584 case pk: ByteVector =>
592585 pk
593586 case _: Unit =>
594587 tx.senderPublicKey
595588 case _ =>
596589 throw("Match error")
597590 }
598591 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
599592 }
600593

github/deemru/w8io/026f985 
78.30 ms