tx · GBouABYyNQ5qo27b5P8iaJYzD4HchJFMfEodyP7GNdtZ

3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv:  -0.02700000 Waves

2022.11.03 15:21 [2300932] smart account 3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv > SELF 0.00000000 Waves

{ "type": 13, "id": "GBouABYyNQ5qo27b5P8iaJYzD4HchJFMfEodyP7GNdtZ", "fee": 2700000, "feeAssetId": null, "timestamp": 1667478089484, "version": 1, "sender": "3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv", "senderPublicKey": "39YkRD2qWXTcdNBr4CbDnm8g8SAB2FKVaDeGYahcFHHx", "proofs": [ "2VpsFJHq7k3Cv8sF5yAwMo3s3dQJUzLRnaz9pAvqcBKVYjRCArmBnccoTgyF4zM7TZwRuiYYFcn9C33S7L6xCDFX" ], "script": "base64:AAIFAAAAAAAADy0IAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZmdQcm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AAACY2YAAAAABAAAAAJjWQMJAQAAAAlpc0RlZmluZWQAAAABBQAAAAJjWAYJAAACAAAAAQIAAAASTm8gcGVuZGluZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAJjWQUAAAACY1kEAAAAAmNaAwkAAAAAAAACCAUAAAACY2gAAAAPY2FsbGVyUHVibGljS2V5CQEAAAAFdmFsdWUAAAABBQAAAAJjWAYJAAACAAAAAQIAAAAbWW91IGFyZSBub3QgcGVuZGluZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAJjWgUAAAACY1oJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAAAmFCAAAAAAkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAJjWAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAACYUMAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACZGEBAAAAAmRiAAAAAAQAAAACZGMEAAAAAmNkCQEAAAACY2MAAAAAAwkAAAEAAAACBQAAAAJjZAIAAAAKQnl0ZVZlY3RvcgQAAAACY2oFAAAAAmNkBQAAAAJjagMJAAABAAAAAgUAAAACY2QCAAAABFVuaXQIBQAAAAJkYQAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmRhAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACZGEAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJkY3J7HEM=", "chainId": 84, "height": 2300932, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9cSBRe14tt8CVmX5shjK7fHJFWYiuEWyaLeK3YC3xPH Next: GuP8Xv9mLH4Nfg6XJ7qwX6jG8MxyaMe8a4uKGCrTnG94 Diff:
OldNewDifferences
274274 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
275275 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
276276 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
277- let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
278- let putOneTknV2PriceAssetAmount = scale8
279- let $t01446014713 = {
280- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
281- if ($isInstanceOf(@, "(Int, Int, Int)"))
282- then @
283- else throw("Couldn't cast Any to (Int, Int, Int)")
284- }
285- if (($t01446014713 == $t01446014713))
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))
286280 then {
287- let bonus = $t01446014713._3
288- let feeAmount = $t01446014713._2
289- let lpAmount = $t01446014713._1
290- let usdtAssetId = value(getString(keyUsdtAssetId()))
291- let $t01477514993 = {
292- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
293- if ($isInstanceOf(@, "(Int, Int)"))
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)"))
294286 then @
295- else throw("Couldn't cast Any to (Int, Int)")
287+ else throw("Couldn't cast Any to (Int, Int, Int)")
296288 }
297- if (($t01477514993 == $t01477514993))
289+ if (($t01471414967 == $t01471414967))
298290 then {
299- let getOneTknV2FeeAmount = $t01477514993._2
300- let usdtAmount = $t01477514993._1
301- let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
302- let endPeriodBlocksLeft = (periodEnd - height)
303- $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
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.")
304310 }
305311 else throw("Strict value is not equal to itself.")
306312 }
439445 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
440446 let entries = if ((claimedAssetId58 == priceAssetId58))
441447 then {
442- let $t02064921093 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
443- let periodMinAvailableToClaim = $t02064921093._1
444- let periodTotalAvailableToClaim = $t02064921093._2
445- let periodUserAvailableToClaim = $t02064921093._3
446- let totalUserAvailableToClaim = $t02064921093._4
447- let usdtPriceAssetAllowableRatio = $t02064921093._5
448- let currentUsdtPriceAssetRatio = $t02064921093._6
449- let endPeriodBlocksLeft = $t02064921093._7
450- let updatedCurrentPeriod = $t02064921093._8
451- let periodStart = $t02064921093._9
452- let periodEnd = $t02064921093._10
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
453459 let checks = [if ((periodUserAvailableToClaim > 0))
454460 then true
455461 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
519525 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
520526 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
521527 let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalance)
522- let $t02761728029 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
523- let periodMinAvailableToClaim = $t02761728029._1
524- let periodTotalAvailableToClaim = $t02761728029._2
525- let periodUserAvailableToClaim = $t02761728029._3
526- let totalUserAvailableToClaim = $t02761728029._4
527- let usdtPriceAssetAllowableRatio = $t02761728029._5
528- let currentUsdtPriceAssetRatio = $t02761728029._6
529- let endPeriodBlocksLeft = $t02761728029._7
530- let updatedCurrentPeriod = $t02761728029._8
531- let periodStart = $t02761728029._9
532- let periodEnd = $t02761728029._10
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
533539 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
534540 let decimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
535541 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))
214214 then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
215215 else if ((claimedAssetId58 == idoAssetId58))
216216 then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
217217 else throw(("unsupported assetId: " + claimedAssetId58))
218218 else throw("Strict value is not equal to itself.")
219219 }
220220
221221
222222 func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = {
223223 let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
224224 let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
225225 let periodLength = value(getInteger(keyPeriodLength()))
226226 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
227227 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
228228 let $t01183513705 = if ((currentPeriod > 0))
229229 then {
230230 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod)))
231231 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod)))
232232 let $t01209512800 = if ((height > lastPeriodEndHeight))
233233 then {
234234 let updatedCurrentPeriod = (currentPeriod + 1)
235235 let periodStart = if ((height > (lastPeriodEndHeight + periodLength)))
236236 then {
237237 let blocksToLastPeriodStart = ((height - lastPeriodEndHeight) % periodLength)
238238 if ((blocksToLastPeriodStart == 0))
239239 then ((height - periodLength) + 1)
240240 else (height - blocksToLastPeriodStart)
241241 }
242242 else (lastPeriodEndHeight + 1)
243243 let periodEnd = ((periodStart + periodLength) - 1)
244244 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
245245 }
246246 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
247247 let updatedCurrentPeriod = $t01209512800._1
248248 let periodStart = $t01209512800._2
249249 let periodEnd = $t01209512800._3
250250 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
251251 }
252252 else if (zeroPeriodEndHeighIsDefined)
253253 then {
254254 let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
255255 let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
256256 let $t01305513437 = if ((height > zeroPeriodEndHeight))
257257 then {
258258 let updatedCurrentPeriod = (currentPeriod + 1)
259259 let periodStart = (zeroPeriodEndHeight + 1)
260260 let periodEnd = ((periodStart + periodLength) - 1)
261261 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
262262 }
263263 else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
264264 let updatedCurrentPeriod = $t01305513437._1
265265 let periodStart = $t01305513437._2
266266 let periodEnd = $t01305513437._3
267267 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
268268 }
269269 else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
270270 let updatedCurrentPeriod = $t01183513705._1
271271 let periodStart = $t01183513705._2
272272 let periodEnd = $t01183513705._3
273273 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
274274 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
275275 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
276276 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
277- let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
278- let putOneTknV2PriceAssetAmount = scale8
279- let $t01446014713 = {
280- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
281- if ($isInstanceOf(@, "(Int, Int, Int)"))
282- then @
283- else throw("Couldn't cast Any to (Int, Int, Int)")
284- }
285- if (($t01446014713 == $t01446014713))
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))
286280 then {
287- let bonus = $t01446014713._3
288- let feeAmount = $t01446014713._2
289- let lpAmount = $t01446014713._1
290- let usdtAssetId = value(getString(keyUsdtAssetId()))
291- let $t01477514993 = {
292- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
293- if ($isInstanceOf(@, "(Int, Int)"))
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)"))
294286 then @
295- else throw("Couldn't cast Any to (Int, Int)")
287+ else throw("Couldn't cast Any to (Int, Int, Int)")
296288 }
297- if (($t01477514993 == $t01477514993))
289+ if (($t01471414967 == $t01471414967))
298290 then {
299- let getOneTknV2FeeAmount = $t01477514993._2
300- let usdtAmount = $t01477514993._1
301- let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
302- let endPeriodBlocksLeft = (periodEnd - height)
303- $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
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.")
304310 }
305311 else throw("Strict value is not equal to itself.")
306312 }
307313 else throw("Strict value is not equal to itself.")
308314 }
309315
310316
311317 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
312318 case s: String =>
313319 fromBase58String(s)
314320 case _: Unit =>
315321 unit
316322 case _ =>
317323 throw("Match error")
318324 }
319325
320326
321327 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
322328 case s: String =>
323329 fromBase58String(s)
324330 case _: Unit =>
325331 unit
326332 case _ =>
327333 throw("Match error")
328334 }
329335
330336
331337 func mustManager (i) = {
332338 let pd = throw("Permission denied")
333339 match managerPublicKeyOrUnit() {
334340 case pk: ByteVector =>
335341 if ((i.callerPublicKey == pk))
336342 then true
337343 else pd
338344 case _: Unit =>
339345 if ((i.caller == this))
340346 then true
341347 else pd
342348 case _ =>
343349 throw("Match error")
344350 }
345351 }
346352
347353
348354 @Callable(i)
349355 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
350356 let priceMult = ((100 * 1000) * 1000)
351357 let idoEnd = (idoStart + idoDuration)
352358 if (isDefined(getString(keyConfig())))
353359 then throw("already initialized")
354360 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
355361 then throw("not authorized")
356362 else if ((size(i.payments) != 1))
357363 then throw("exactly 1 payment must be attached")
358364 else if ((idoEnd >= claimStart))
359365 then throw("claimStart must be greater than idoEnd")
360366 else {
361367 let pmt = value(i.payments[0])
362368 let idoAssetId = value(pmt.assetId)
363369 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
364370 let idoAssetId58 = toBase58String(idoAssetId)
365371 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
366372 let priceAssetId = fromBase58String(priceAssetId58)
367373 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
368374 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
369375 let origTotalsArray = readTotalsArrayOrDefault()
370376 let totalsDiff = [0, 0, 0, 0]
371377 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)]
372378 }
373379 }
374380
375381
376382
377383 @Callable(i)
378384 func invest () = {
379385 let cfgArray = readConfigArray()
380386 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
381387 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
382388 let idoEnd = (idoStart + idoDuration)
383389 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
384390 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
385391 let price = parseIntValue(cfgArray[IdxCfgPrice])
386392 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
387393 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
388394 let idoAssetId = fromBase58String(idoAssetId58)
389395 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
390396 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
391397 let priceAssetId = fromBase58String(priceAssetId58)
392398 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
393399 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
394400 let userAddress = toString(i.caller)
395401 if ((idoStart > height))
396402 then throw("ido has not been started yet")
397403 else if ((height > idoEnd))
398404 then throw("ido has been already ended")
399405 else if ((size(i.payments) != 1))
400406 then throw("exactly 1 payment is expected")
401407 else {
402408 let pmt = value(i.payments[0])
403409 let pmtAssetId = value(pmt.assetId)
404410 let pmtAmount = pmt.amount
405411 if ((pmtAssetId != priceAssetId))
406412 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
407413 else {
408414 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
409415 let origTotalsArray = readTotalsArrayOrDefault()
410416 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
411417 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
412418 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
413419 then throw("IDO asset has been - sold consider to use smaller payment")
414420 else {
415421 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
416422 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
417423 }
418424 }
419425 }
420426 }
421427
422428
423429
424430 @Callable(i)
425431 func claim (claimedAssetId58,userAddress58) = {
426432 let callerAddress58 = toString(i.caller)
427433 if ((userAddress58 != callerAddress58))
428434 then throw("not authorized")
429435 else {
430436 let cfgArray = readConfigArray()
431437 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
432438 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
433439 let totalsDiff = claimResultTuple._1
434440 let outAmount = claimResultTuple._2
435441 let outAssetId = claimResultTuple._3
436442 let origInvestArray = claimResultTuple._4
437443 let newClaimPeriodHeight = claimResultTuple._5
438444 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
439445 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
440446 let entries = if ((claimedAssetId58 == priceAssetId58))
441447 then {
442- let $t02064921093 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
443- let periodMinAvailableToClaim = $t02064921093._1
444- let periodTotalAvailableToClaim = $t02064921093._2
445- let periodUserAvailableToClaim = $t02064921093._3
446- let totalUserAvailableToClaim = $t02064921093._4
447- let usdtPriceAssetAllowableRatio = $t02064921093._5
448- let currentUsdtPriceAssetRatio = $t02064921093._6
449- let endPeriodBlocksLeft = $t02064921093._7
450- let updatedCurrentPeriod = $t02064921093._8
451- let periodStart = $t02064921093._9
452- let periodEnd = $t02064921093._10
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
453459 let checks = [if ((periodUserAvailableToClaim > 0))
454460 then true
455461 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
456462 then true
457463 else throwErr("unavailable to claim because total period allowance reached"), if ((periodMinAvailableToClaim > 0))
458464 then true
459465 else throwErr("nothing to claim"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio))
460466 then true
461467 else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")]
462468 if ((checks == checks))
463469 then {
464470 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
465471 let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim)
466472 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
467473 let priceAssetDecimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
468474 let periodMinAvailableToClaimPriceAssetDecimals = fraction(periodMinAvailableToClaim, pow(10, 0, priceAssetDecimals, 0, 0, DOWN), scale8)
469475 let error = throw(makeString([toString(priceAssetDecimals), toString(periodMinAvailableToClaim), toString(periodMinAvailableToClaimPriceAssetDecimals)], SEP))
470476 if ((error == error))
471477 then {
472478 let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
473479 then [ScriptTransfer(i.caller, periodMinAvailableToClaimPriceAssetDecimals, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
474480 else {
475481 let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
476482 [ScriptTransfer(i.caller, periodMinAvailableToClaimPriceAssetDecimals, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)]
477483 }
478484 $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)
479485 }
480486 else throw("Strict value is not equal to itself.")
481487 }
482488 else throw("Strict value is not equal to itself.")
483489 }
484490 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)
485491 entries
486492 }
487493 }
488494
489495
490496
491497 @Callable(i)
492498 func claimREADONLY (claimedAssetId58,userAddress58) = {
493499 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
494500 let totalsDiff = claimResultTuple._1
495501 let outAmount = claimResultTuple._2
496502 let outAssetId = claimResultTuple._3
497503 let origInvestArray = claimResultTuple._4
498504 let newClaimPeriodHeight = claimResultTuple._5
499505 let availableToClaimArray = claimResultTuple._6
500506 let availablePriceAmountToClaim = availableToClaimArray[0]
501507 let availableIdoAmountToClaim = availableToClaimArray[1]
502508 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
503509 }
504510
505511
506512
507513 @Callable(i)
508514 func claimV2READONLY (claimedAssetId58,userAddress58) = {
509515 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
510516 let totalsDiff = claimResultTuple._1
511517 let outAmount = claimResultTuple._2
512518 let outAssetId = claimResultTuple._3
513519 let origInvestArray = claimResultTuple._4
514520 let newClaimPeriodHeight = claimResultTuple._5
515521 let availableToClaimArray = claimResultTuple._6
516522 let availablePriceAmountToClaim = availableToClaimArray[0]
517523 let availableIdoAmountToClaim = availableToClaimArray[1]
518524 let cfgArray = readConfigArray()
519525 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
520526 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
521527 let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalance)
522- let $t02761728029 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
523- let periodMinAvailableToClaim = $t02761728029._1
524- let periodTotalAvailableToClaim = $t02761728029._2
525- let periodUserAvailableToClaim = $t02761728029._3
526- let totalUserAvailableToClaim = $t02761728029._4
527- let usdtPriceAssetAllowableRatio = $t02761728029._5
528- let currentUsdtPriceAssetRatio = $t02761728029._6
529- let endPeriodBlocksLeft = $t02761728029._7
530- let updatedCurrentPeriod = $t02761728029._8
531- let periodStart = $t02761728029._9
532- let periodEnd = $t02761728029._10
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
533539 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
534540 let decimals = value(assetInfo(fromBase58String(claimedAssetId58))).decimals
535541 let resultString = if ((height > currentPeriodEndHeight))
536542 then {
537543 let periodLenght = value(getInteger(keyPeriodLength()))
538544 let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
539545 let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
540546 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)
541547 }
542548 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)
543549 $Tuple2(nil, resultString)
544550 }
545551
546552
547553
548554 @Callable(i)
549555 func setManager (pendingManagerPublicKey) = {
550556 let checkCaller = mustManager(i)
551557 if ((checkCaller == checkCaller))
552558 then {
553559 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
554560 if ((checkManagerPublicKey == checkManagerPublicKey))
555561 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
556562 else throw("Strict value is not equal to itself.")
557563 }
558564 else throw("Strict value is not equal to itself.")
559565 }
560566
561567
562568
563569 @Callable(i)
564570 func confirmManager () = {
565571 let pm = pendingManagerPublicKeyOrUnit()
566572 let hasPM = if (isDefined(pm))
567573 then true
568574 else throw("No pending manager")
569575 if ((hasPM == hasPM))
570576 then {
571577 let checkPM = if ((i.callerPublicKey == value(pm)))
572578 then true
573579 else throw("You are not pending manager")
574580 if ((checkPM == checkPM))
575581 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
576582 else throw("Strict value is not equal to itself.")
577583 }
578584 else throw("Strict value is not equal to itself.")
579585 }
580586
581587
582588 @Verifier(tx)
583589 func verify () = {
584590 let targetPublicKey = match managerPublicKeyOrUnit() {
585591 case pk: ByteVector =>
586592 pk
587593 case _: Unit =>
588594 tx.senderPublicKey
589595 case _ =>
590596 throw("Match error")
591597 }
592598 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
593599 }
594600

github/deemru/w8io/026f985 
118.24 ms