tx · 59ScimVV9rdyddhpeKirTdauibTBLhEQFL2usea7BG5p

3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv:  -0.02600000 Waves

2022.11.02 21:29 [2299853] smart account 3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv > SELF 0.00000000 Waves

{ "type": 13, "id": "59ScimVV9rdyddhpeKirTdauibTBLhEQFL2usea7BG5p", "fee": 2600000, "feeAssetId": null, "timestamp": 1667413841300, "version": 1, "sender": "3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv", "senderPublicKey": "39YkRD2qWXTcdNBr4CbDnm8g8SAB2FKVaDeGYahcFHHx", "proofs": [ "2rkYSbR113vDxEEkcvLGwYukzM9ErKr49JC5EPhQTChRNrF6tG1soVS8KTEZhWPdGXBFdCeDB89oYbm7Q1MjuaWG" ], "script": "base64:AAIFAAAAAAAADp8IAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZmdQcmljZUFzc2V0TXVs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ded", "spentComplexity": 0 } View: original | compacted Prev: Cy3hdSkUx6YmxG5dz5XdSYPLpyEd6bHuZtm9A481kpf7 Next: 5skf8CndkAFADhnL9cHsKLMtQSpeeYuqLowaanmBB4k9 Diff:
OldNewDifferences
236236 let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
237237 let periodLength = value(getInteger(keyPeriodLength()))
238238 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
239- let $t01194712865 = if ((currentPeriod > 0))
239+ let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
240+ let $t01203113586 = if ((currentPeriod > 0))
240241 then {
241242 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1))))
242243 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1))))
243- let $t01221512597 = if ((height > lastPeriodEndHeight))
244+ let $t01229912681 = if ((height > lastPeriodEndHeight))
244245 then {
245246 let updatedCurrentPeriod = (currentPeriod + 1)
246247 let periodStart = (lastPeriodEndHeight + 1)
248249 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
249250 }
250251 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
251- let updatedCurrentPeriod = $t01221512597._1
252- let periodStart = $t01221512597._2
253- let periodEnd = $t01221512597._3
252+ let updatedCurrentPeriod = $t01229912681._1
253+ let periodStart = $t01229912681._2
254+ let periodEnd = $t01229912681._3
254255 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
255256 }
256- else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
257- let updatedCurrentPeriod = $t01194712865._1
258- let periodStart = $t01194712865._2
259- let periodEnd = $t01194712865._3
257+ else if (zeroPeriodEndHeighIsDefined)
258+ then {
259+ let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
260+ let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
261+ let $t01293613318 = if ((height > zeroPeriodEndHeight))
262+ then {
263+ let updatedCurrentPeriod = (currentPeriod + 1)
264+ let periodStart = (zeroPeriodEndHeight + 1)
265+ let periodEnd = ((periodStart + periodLength) - 1)
266+ $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
267+ }
268+ else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
269+ let updatedCurrentPeriod = $t01293613318._1
270+ let periodStart = $t01293613318._2
271+ let periodEnd = $t01293613318._3
272+ $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
273+ }
274+ else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
275+ let updatedCurrentPeriod = $t01203113586._1
276+ let periodStart = $t01203113586._2
277+ let periodEnd = $t01203113586._3
260278 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
261279 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
262280 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
263281 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
264282 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
265283 let putOneTknV2PriceAssetAmount = scale8
266- let $t01362013873 = {
284+ let $t01434114594 = {
267285 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
268286 if ($isInstanceOf(@, "(Int, Int, Int)"))
269287 then @
270288 else throw("Couldn't cast Any to (Int, Int, Int)")
271289 }
272- if (($t01362013873 == $t01362013873))
290+ if (($t01434114594 == $t01434114594))
273291 then {
274- let bonus = $t01362013873._3
275- let feeAmount = $t01362013873._2
276- let lpAmount = $t01362013873._1
292+ let bonus = $t01434114594._3
293+ let feeAmount = $t01434114594._2
294+ let lpAmount = $t01434114594._1
277295 let usdtAssetId = value(getString(keyUsdtAssetId()))
278- let $t01393514153 = {
296+ let $t01465614874 = {
279297 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
280298 if ($isInstanceOf(@, "(Int, Int)"))
281299 then @
282300 else throw("Couldn't cast Any to (Int, Int)")
283301 }
284- if (($t01393514153 == $t01393514153))
302+ if (($t01465614874 == $t01465614874))
285303 then {
286- let getOneTknV2FeeAmount = $t01393514153._2
287- let usdtAmount = $t01393514153._1
304+ let getOneTknV2FeeAmount = $t01465614874._2
305+ let usdtAmount = $t01465614874._1
288306 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
289307 let endPeriodBlocksLeft = (periodEnd - height)
290308 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
426444 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
427445 let entries = if ((claimedAssetId58 == priceAssetId58))
428446 then {
429- let $t01980920253 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
430- let periodMinAvailableToClaim = $t01980920253._1
431- let periodTotalAvailableToClaim = $t01980920253._2
432- let periodUserAvailableToClaim = $t01980920253._3
433- let totalUserAvailableToClaim = $t01980920253._4
434- let usdtPriceAssetAllowableRatio = $t01980920253._5
435- let currentUsdtPriceAssetRatio = $t01980920253._6
436- let endPeriodBlocksLeft = $t01980920253._7
437- let updatedCurrentPeriod = $t01980920253._8
438- let periodStart = $t01980920253._9
439- let periodEnd = $t01980920253._10
447+ let $t02053020974 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
448+ let periodMinAvailableToClaim = $t02053020974._1
449+ let periodTotalAvailableToClaim = $t02053020974._2
450+ let periodUserAvailableToClaim = $t02053020974._3
451+ let totalUserAvailableToClaim = $t02053020974._4
452+ let usdtPriceAssetAllowableRatio = $t02053020974._5
453+ let currentUsdtPriceAssetRatio = $t02053020974._6
454+ let endPeriodBlocksLeft = $t02053020974._7
455+ let updatedCurrentPeriod = $t02053020974._8
456+ let periodStart = $t02053020974._9
457+ let periodEnd = $t02053020974._10
440458 let checks = [if ((periodMinAvailableToClaim > 0))
441459 then true
442460 else throwErr(makeString(["nothing to claim", toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(periodUserAvailableToClaim), toString(totalUserAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft), toString(updatedCurrentPeriod), toString(periodStart), toString(periodEnd)], SEP)), if ((periodUserAvailableToClaim > 0))
497515 let availableIdoAmountToClaim = availableToClaimArray[1]
498516 let cfgArray = readConfigArray()
499517 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
500- let $t02648626898 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
501- let periodMinAvailableToClaim = $t02648626898._1
502- let periodTotalAvailableToClaim = $t02648626898._2
503- let periodUserAvailableToClaim = $t02648626898._3
504- let totalUserAvailableToClaim = $t02648626898._4
505- let usdtPriceAssetAllowableRatio = $t02648626898._5
506- let currentUsdtPriceAssetRatio = $t02648626898._6
507- let endPeriodBlocksLeft = $t02648626898._7
508- let updatedCurrentPeriod = $t02648626898._8
509- let periodStart = $t02648626898._9
510- let periodEnd = $t02648626898._10
518+ let $t02720727619 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
519+ let periodMinAvailableToClaim = $t02720727619._1
520+ let periodTotalAvailableToClaim = $t02720727619._2
521+ let periodUserAvailableToClaim = $t02720727619._3
522+ let totalUserAvailableToClaim = $t02720727619._4
523+ let usdtPriceAssetAllowableRatio = $t02720727619._5
524+ let currentUsdtPriceAssetRatio = $t02720727619._6
525+ let endPeriodBlocksLeft = $t02720727619._7
526+ let updatedCurrentPeriod = $t02720727619._8
527+ let periodStart = $t02720727619._9
528+ let periodEnd = $t02720727619._10
511529 let currentPeriodEndHeight = value(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)))
512530 let resultString = if ((height > currentPeriodEndHeight))
513531 then {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
55
66
77 let SEP = "__"
88
99 let BUFSCALE = toBigInt(1000000000000000000)
1010
1111 let scale8 = 100000000
1212
1313 func throwErr (msg) = throw(makeString(["ido.ride:", msg], " "))
1414
1515
1616 func convertPriceAssetIntoIdoAsset (priceAssetAmount,priceAssetMULT,price,priceMULT,idoAssetMULT) = {
1717 let bPriceAssetMULT = toBigInt(priceAssetMULT)
1818 let bIdoAssetMULT = toBigInt(idoAssetMULT)
1919 let bPriceAssetBUF = fraction(toBigInt(priceAssetAmount), BUFSCALE, bPriceAssetMULT)
2020 let bAmountAssetBUF = fraction(bPriceAssetBUF, toBigInt(priceMULT), toBigInt(price))
2121 toInt(fraction(bAmountAssetBUF, toBigInt(idoAssetMULT), BUFSCALE))
2222 }
2323
2424
2525 let IdxCfgIdoStart = 1
2626
2727 let IdxCfgIdoDuration = 2
2828
2929 let IdxCfgClaimStart = 3
3030
3131 let IdxCfgClaimDuration = 4
3232
3333 let IdxCfgPrice = 5
3434
3535 let IdxCfgPriceMult = 6
3636
3737 let IdxCfgIdoAssetId = 7
3838
3939 let IdxCfgIdoAssetMult = 8
4040
4141 let IdxCfgPriceAssetId = 9
4242
4343 let IdxCfgPriceAssetMult = 10
4444
4545 let IdxCfgMinInvestAmount = 11
4646
4747 func fromatConfigS (idoStart,idoDuration,claimStart,claimDuration,price,priceMult,idoAssetId58,idoAssetMult,priceAssetId58,priceAssetMult,minInvestAmount,totalIdoAssetToSell) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, totalIdoAssetToSell], SEP)
4848
4949
5050 func fromatConfig (idoStart,idoDuration,claimStart,claimDuration,price,priceMult,idoAssetId58,idoAssetMult,priceAssetId58,priceAssetMult,minInvestAmount,totalIdoAssetToSell) = fromatConfigS(toString(idoStart), toString(idoDuration), toString(claimStart), toString(claimDuration), toString(price), toString(priceMult), idoAssetId58, toString(idoAssetMult), priceAssetId58, toString(priceAssetMult), toString(minInvestAmount), toString(totalIdoAssetToSell))
5151
5252
5353 let IdxInvTotalAmount = 1
5454
5555 let IdxInvRemainingAmount = 2
5656
5757 let IdxInvClaimedPriceAssetAmount = 3
5858
5959 let IdxInvClaimedIdoAssetAmount = 4
6060
6161 let IdxInvLastClaimedHeight = 5
6262
6363 func formatInvestorS (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, claimedPriceAssetAmount, claimedIdoAssetAmount, lastClaimedHeight], SEP)
6464
6565
6666 func formatInvestor (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = formatInvestorS(toString(totalAmount), toString(remainingAmount), toString(claimedPriceAssetAmount), toString(claimedIdoAssetAmount), toString(lastClaimedHeight))
6767
6868
6969 func formatHistoryRecord (priceAssetAmount,idoAssetAmount) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(priceAssetAmount), toString(idoAssetAmount)], SEP)
7070
7171
7272 func keyConfig () = "%s__config"
7373
7474
7575 func keyInvestor (userAddress) = ("%s__" + userAddress)
7676
7777
7878 func keyTotals () = "%s__totals"
7979
8080
8181 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
8282
8383
8484 func keyUSDNClaimDisabled () = "%s__usdnClaimDisabled"
8585
8686
8787 func keyUSDNClaimEndHeight () = "%s__usdnClaimEndHeight"
8888
8989
9090 func keyPeriodLength () = makeString(["%s", "periodLength"], SEP)
9191
9292
9393 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
9494
9595
9696 func keyPeriodStartHeight (periodNum) = makeString(["%s%s", "periodStartHeight", toString(periodNum)], SEP)
9797
9898
9999 func keyPeriodEndHeight (periodNum) = makeString(["%s%s", "periodEndHeight", toString(periodNum)], SEP)
100100
101101
102102 func keyUsdtPriceAssetAllowableRatio () = makeString(["%s", "usdtPriceAssetAllowableRatio"], SEP)
103103
104104
105105 func keyTotalPeriodAllowance (assetId) = makeString(["%s%s", "totalPeriodAllowance", assetId], SEP)
106106
107107
108108 func keyUserPeriodAllowance (assetId) = makeString(["%s%s", "userPeriodAllowance", assetId], SEP)
109109
110110
111111 func keyPeriodTotalAvailableToClaim (assetId,periodNum) = makeString(["%s%s%s", "periodTotalAvailableToClaim", assetId, toString(periodNum)], SEP)
112112
113113
114114 func keyPeriodUserAvailableToClaim (assetId,periodNum,userAddress) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", assetId, toString(periodNum), userAddress], SEP)
115115
116116
117117 func keyUsdtPriceAssetStablePool () = makeString(["%s", "usdtPriceAssetStablePool"], SEP)
118118
119119
120120 func keyUsdtAssetId () = makeString(["%s", "usdtAssetId"], SEP)
121121
122122
123123 func keyPriceAssetBalance (address) = makeString(["%s%s", "priceAssetBalance", address], SEP)
124124
125125
126126 func keyManagerPublicKey () = "%s__managerPublicKey"
127127
128128
129129 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
130130
131131
132132 func readConfigArray () = split(getStringOrFail(keyConfig()), SEP)
133133
134134
135135 func readTotalsArrayOrDefaultByCustomKey (customKey) = split(valueOrElse(getString(customKey), formatInvestorS("0", "0", "0", "0", "0")), SEP)
136136
137137
138138 func readTotalsArrayOrDefault () = readTotalsArrayOrDefaultByCustomKey(keyTotals())
139139
140140
141141 func readInvestorArrayOrDefault (userAddress) = readTotalsArrayOrDefaultByCustomKey(keyInvestor(userAddress))
142142
143143
144144 func readInvestorArrayOrFail (userAddress) = split(getStringOrFail(keyInvestor(userAddress)), SEP)
145145
146146
147147 let IdxDiffTotalIncrement = 0
148148
149149 let IdxDiffRemainingPriceAmountIncrement = 1
150150
151151 let IdxDiffClaimedPriceAmountIncrement = 2
152152
153153 let IdxDiffClaimedIdoAssetAmountIncrement = 3
154154
155155 func TotalsEntry (key,origArray,incrementDiff,newLastClaimedHeight) = {
156156 let totalAmount = parseIntValue(origArray[IdxInvTotalAmount])
157157 let remainingAmount = parseIntValue(origArray[IdxInvRemainingAmount])
158158 let claimedPriceAssetAmount = parseIntValue(origArray[IdxInvClaimedPriceAssetAmount])
159159 let claimedIdoAssetAmount = parseIntValue(origArray[IdxInvClaimedIdoAssetAmount])
160160 let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight])
161161 let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement])
162162 let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement])
163163 let newClaimedPriceAssetAmount = (claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement])
164164 let newClaimedIdoAssetAmount = (claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement])
165165 if ((0 > newRemainingAmount))
166166 then throw("invalid math")
167167 else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight))
168168 }
169169
170170
171171 func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
172172
173173
174174 func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
175175
176176
177177 func internalClaim (claimedAssetId58,userAddress,txId) = {
178178 let cfgArray = readConfigArray()
179179 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
180180 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
181181 let claimEnd = (claimStart + claimDuration)
182182 let price = parseIntValue(cfgArray[IdxCfgPrice])
183183 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
184184 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
185185 let idoAssetId = fromBase58String(idoAssetId58)
186186 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
187187 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
188188 let priceAssetId = fromBase58String(priceAssetId58)
189189 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
190190 let userAddress58 = toString(userAddress)
191191 let origInvestArray = readInvestorArrayOrFail(userAddress58)
192192 let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount])
193193 let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight])
194194 let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP))
195195 then claimStart
196196 else investLastClaimedHeightTMP
197197 let newClaimPeriodHeight = if ((height > claimEnd))
198198 then claimEnd
199199 else if ((claimStart > height))
200200 then claimStart
201201 else height
202202 let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight)
203203 let claimingPriceAssetAmount = fraction(investTotalAmount, claimingBlocks, claimDuration)
204204 let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult)
205205 let isUSDN = (claimedAssetId58 == priceAssetId58)
206206 let isUSDNClaimDisabled = valueOrElse(getBoolean(keyUSDNClaimDisabled()), false)
207207 let isUSDNClaimEnded = match getInteger(keyUSDNClaimEndHeight()) {
208208 case end: Int =>
209209 (height > end)
210210 case _: Unit =>
211211 false
212212 case _ =>
213213 throw("Match error")
214214 }
215215 let checks = [if (!(if (isUSDN)
216216 then isUSDNClaimDisabled
217217 else false))
218218 then true
219219 else throw("USDN claim is disabled"), if (!(if (isUSDN)
220220 then isUSDNClaimEnded
221221 else false))
222222 then true
223223 else throw("USDN claim is ended")]
224224 if ((checks == checks))
225225 then if ((claimedAssetId58 == priceAssetId58))
226226 then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
227227 else if ((claimedAssetId58 == idoAssetId58))
228228 then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
229229 else throw(("unsupported assetId: " + claimedAssetId58))
230230 else throw("Strict value is not equal to itself.")
231231 }
232232
233233
234234 func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = {
235235 let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
236236 let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
237237 let periodLength = value(getInteger(keyPeriodLength()))
238238 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
239- let $t01194712865 = if ((currentPeriod > 0))
239+ let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
240+ let $t01203113586 = if ((currentPeriod > 0))
240241 then {
241242 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1))))
242243 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1))))
243- let $t01221512597 = if ((height > lastPeriodEndHeight))
244+ let $t01229912681 = if ((height > lastPeriodEndHeight))
244245 then {
245246 let updatedCurrentPeriod = (currentPeriod + 1)
246247 let periodStart = (lastPeriodEndHeight + 1)
247248 let periodEnd = ((periodStart + periodLength) - 1)
248249 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
249250 }
250251 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
251- let updatedCurrentPeriod = $t01221512597._1
252- let periodStart = $t01221512597._2
253- let periodEnd = $t01221512597._3
252+ let updatedCurrentPeriod = $t01229912681._1
253+ let periodStart = $t01229912681._2
254+ let periodEnd = $t01229912681._3
254255 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
255256 }
256- else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
257- let updatedCurrentPeriod = $t01194712865._1
258- let periodStart = $t01194712865._2
259- let periodEnd = $t01194712865._3
257+ else if (zeroPeriodEndHeighIsDefined)
258+ then {
259+ let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
260+ let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
261+ let $t01293613318 = if ((height > zeroPeriodEndHeight))
262+ then {
263+ let updatedCurrentPeriod = (currentPeriod + 1)
264+ let periodStart = (zeroPeriodEndHeight + 1)
265+ let periodEnd = ((periodStart + periodLength) - 1)
266+ $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
267+ }
268+ else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
269+ let updatedCurrentPeriod = $t01293613318._1
270+ let periodStart = $t01293613318._2
271+ let periodEnd = $t01293613318._3
272+ $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
273+ }
274+ else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
275+ let updatedCurrentPeriod = $t01203113586._1
276+ let periodStart = $t01203113586._2
277+ let periodEnd = $t01203113586._3
260278 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
261279 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
262280 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
263281 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
264282 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
265283 let putOneTknV2PriceAssetAmount = scale8
266- let $t01362013873 = {
284+ let $t01434114594 = {
267285 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
268286 if ($isInstanceOf(@, "(Int, Int, Int)"))
269287 then @
270288 else throw("Couldn't cast Any to (Int, Int, Int)")
271289 }
272- if (($t01362013873 == $t01362013873))
290+ if (($t01434114594 == $t01434114594))
273291 then {
274- let bonus = $t01362013873._3
275- let feeAmount = $t01362013873._2
276- let lpAmount = $t01362013873._1
292+ let bonus = $t01434114594._3
293+ let feeAmount = $t01434114594._2
294+ let lpAmount = $t01434114594._1
277295 let usdtAssetId = value(getString(keyUsdtAssetId()))
278- let $t01393514153 = {
296+ let $t01465614874 = {
279297 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
280298 if ($isInstanceOf(@, "(Int, Int)"))
281299 then @
282300 else throw("Couldn't cast Any to (Int, Int)")
283301 }
284- if (($t01393514153 == $t01393514153))
302+ if (($t01465614874 == $t01465614874))
285303 then {
286- let getOneTknV2FeeAmount = $t01393514153._2
287- let usdtAmount = $t01393514153._1
304+ let getOneTknV2FeeAmount = $t01465614874._2
305+ let usdtAmount = $t01465614874._1
288306 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
289307 let endPeriodBlocksLeft = (periodEnd - height)
290308 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
291309 }
292310 else throw("Strict value is not equal to itself.")
293311 }
294312 else throw("Strict value is not equal to itself.")
295313 }
296314
297315
298316 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
299317 case s: String =>
300318 fromBase58String(s)
301319 case _: Unit =>
302320 unit
303321 case _ =>
304322 throw("Match error")
305323 }
306324
307325
308326 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
309327 case s: String =>
310328 fromBase58String(s)
311329 case _: Unit =>
312330 unit
313331 case _ =>
314332 throw("Match error")
315333 }
316334
317335
318336 func mustManager (i) = {
319337 let pd = throw("Permission denied")
320338 match managerPublicKeyOrUnit() {
321339 case pk: ByteVector =>
322340 if ((i.callerPublicKey == pk))
323341 then true
324342 else pd
325343 case _: Unit =>
326344 if ((i.caller == this))
327345 then true
328346 else pd
329347 case _ =>
330348 throw("Match error")
331349 }
332350 }
333351
334352
335353 @Callable(i)
336354 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
337355 let priceMult = ((100 * 1000) * 1000)
338356 let idoEnd = (idoStart + idoDuration)
339357 if (isDefined(getString(keyConfig())))
340358 then throw("already initialized")
341359 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
342360 then throw("not authorized")
343361 else if ((size(i.payments) != 1))
344362 then throw("exactly 1 payment must be attached")
345363 else if ((idoEnd >= claimStart))
346364 then throw("claimStart must be greater than idoEnd")
347365 else {
348366 let pmt = value(i.payments[0])
349367 let idoAssetId = value(pmt.assetId)
350368 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
351369 let idoAssetId58 = toBase58String(idoAssetId)
352370 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
353371 let priceAssetId = fromBase58String(priceAssetId58)
354372 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
355373 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
356374 let origTotalsArray = readTotalsArrayOrDefault()
357375 let totalsDiff = [0, 0, 0, 0]
358376 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)]
359377 }
360378 }
361379
362380
363381
364382 @Callable(i)
365383 func invest () = {
366384 let cfgArray = readConfigArray()
367385 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
368386 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
369387 let idoEnd = (idoStart + idoDuration)
370388 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
371389 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
372390 let price = parseIntValue(cfgArray[IdxCfgPrice])
373391 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
374392 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
375393 let idoAssetId = fromBase58String(idoAssetId58)
376394 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
377395 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
378396 let priceAssetId = fromBase58String(priceAssetId58)
379397 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
380398 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
381399 let userAddress = toString(i.caller)
382400 if ((idoStart > height))
383401 then throw("ido has not been started yet")
384402 else if ((height > idoEnd))
385403 then throw("ido has been already ended")
386404 else if ((size(i.payments) != 1))
387405 then throw("exactly 1 payment is expected")
388406 else {
389407 let pmt = value(i.payments[0])
390408 let pmtAssetId = value(pmt.assetId)
391409 let pmtAmount = pmt.amount
392410 if ((pmtAssetId != priceAssetId))
393411 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
394412 else {
395413 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
396414 let origTotalsArray = readTotalsArrayOrDefault()
397415 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
398416 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
399417 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
400418 then throw("IDO asset has been - sold consider to use smaller payment")
401419 else {
402420 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
403421 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
404422 }
405423 }
406424 }
407425 }
408426
409427
410428
411429 @Callable(i)
412430 func claim (claimedAssetId58,userAddress58) = {
413431 let callerAddress58 = toString(i.caller)
414432 if ((userAddress58 != callerAddress58))
415433 then throw("not authorized")
416434 else {
417435 let cfgArray = readConfigArray()
418436 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
419437 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
420438 let totalsDiff = claimResultTuple._1
421439 let outAmount = claimResultTuple._2
422440 let outAssetId = claimResultTuple._3
423441 let origInvestArray = claimResultTuple._4
424442 let newClaimPeriodHeight = claimResultTuple._5
425443 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
426444 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
427445 let entries = if ((claimedAssetId58 == priceAssetId58))
428446 then {
429- let $t01980920253 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
430- let periodMinAvailableToClaim = $t01980920253._1
431- let periodTotalAvailableToClaim = $t01980920253._2
432- let periodUserAvailableToClaim = $t01980920253._3
433- let totalUserAvailableToClaim = $t01980920253._4
434- let usdtPriceAssetAllowableRatio = $t01980920253._5
435- let currentUsdtPriceAssetRatio = $t01980920253._6
436- let endPeriodBlocksLeft = $t01980920253._7
437- let updatedCurrentPeriod = $t01980920253._8
438- let periodStart = $t01980920253._9
439- let periodEnd = $t01980920253._10
447+ let $t02053020974 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
448+ let periodMinAvailableToClaim = $t02053020974._1
449+ let periodTotalAvailableToClaim = $t02053020974._2
450+ let periodUserAvailableToClaim = $t02053020974._3
451+ let totalUserAvailableToClaim = $t02053020974._4
452+ let usdtPriceAssetAllowableRatio = $t02053020974._5
453+ let currentUsdtPriceAssetRatio = $t02053020974._6
454+ let endPeriodBlocksLeft = $t02053020974._7
455+ let updatedCurrentPeriod = $t02053020974._8
456+ let periodStart = $t02053020974._9
457+ let periodEnd = $t02053020974._10
440458 let checks = [if ((periodMinAvailableToClaim > 0))
441459 then true
442460 else throwErr(makeString(["nothing to claim", toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(periodUserAvailableToClaim), toString(totalUserAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft), toString(updatedCurrentPeriod), toString(periodStart), toString(periodEnd)], SEP)), if ((periodUserAvailableToClaim > 0))
443461 then true
444462 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
445463 then true
446464 else throwErr("unavailable to claim because total period allowance reached"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio))
447465 then true
448466 else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")]
449467 if ((checks == checks))
450468 then {
451469 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
452470 let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim)
453471 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
454472 let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
455473 then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
456474 else {
457475 let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
458476 [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)]
459477 }
460478 $Tuple2(([IntegerEntry(keyCurrentPeriod(), updatedCurrentPeriod), IntegerEntry(keyPeriodStartHeight(updatedCurrentPeriod), periodStart), IntegerEntry(keyPeriodEndHeight(updatedCurrentPeriod), periodEnd), IntegerEntry(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod), updatedPeriodTotalAvailableToClaim), IntegerEntry(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58), updatedPeriodUserAvailableToClaim), ClaimOperationHistoryEntry(userAddress58, periodMinAvailableToClaim, claimedIdoAssetAmountFromDiff, i.transactionId)] ++ entries), unit)
461479 }
462480 else throw("Strict value is not equal to itself.")
463481 }
464482 else $Tuple2([ScriptTransfer(i.caller, outAmount, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, claimedIdoAssetAmountFromDiff, i.transactionId)], unit)
465483 entries
466484 }
467485 }
468486
469487
470488
471489 @Callable(i)
472490 func claimREADONLY (claimedAssetId58,userAddress58) = {
473491 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
474492 let totalsDiff = claimResultTuple._1
475493 let outAmount = claimResultTuple._2
476494 let outAssetId = claimResultTuple._3
477495 let origInvestArray = claimResultTuple._4
478496 let newClaimPeriodHeight = claimResultTuple._5
479497 let availableToClaimArray = claimResultTuple._6
480498 let availablePriceAmountToClaim = availableToClaimArray[0]
481499 let availableIdoAmountToClaim = availableToClaimArray[1]
482500 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
483501 }
484502
485503
486504
487505 @Callable(i)
488506 func claimV2READONLY (claimedAssetId58,userAddress58) = {
489507 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
490508 let totalsDiff = claimResultTuple._1
491509 let outAmount = claimResultTuple._2
492510 let outAssetId = claimResultTuple._3
493511 let origInvestArray = claimResultTuple._4
494512 let newClaimPeriodHeight = claimResultTuple._5
495513 let availableToClaimArray = claimResultTuple._6
496514 let availablePriceAmountToClaim = availableToClaimArray[0]
497515 let availableIdoAmountToClaim = availableToClaimArray[1]
498516 let cfgArray = readConfigArray()
499517 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
500- let $t02648626898 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
501- let periodMinAvailableToClaim = $t02648626898._1
502- let periodTotalAvailableToClaim = $t02648626898._2
503- let periodUserAvailableToClaim = $t02648626898._3
504- let totalUserAvailableToClaim = $t02648626898._4
505- let usdtPriceAssetAllowableRatio = $t02648626898._5
506- let currentUsdtPriceAssetRatio = $t02648626898._6
507- let endPeriodBlocksLeft = $t02648626898._7
508- let updatedCurrentPeriod = $t02648626898._8
509- let periodStart = $t02648626898._9
510- let periodEnd = $t02648626898._10
518+ let $t02720727619 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
519+ let periodMinAvailableToClaim = $t02720727619._1
520+ let periodTotalAvailableToClaim = $t02720727619._2
521+ let periodUserAvailableToClaim = $t02720727619._3
522+ let totalUserAvailableToClaim = $t02720727619._4
523+ let usdtPriceAssetAllowableRatio = $t02720727619._5
524+ let currentUsdtPriceAssetRatio = $t02720727619._6
525+ let endPeriodBlocksLeft = $t02720727619._7
526+ let updatedCurrentPeriod = $t02720727619._8
527+ let periodStart = $t02720727619._9
528+ let periodEnd = $t02720727619._10
511529 let currentPeriodEndHeight = value(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)))
512530 let resultString = if ((height > currentPeriodEndHeight))
513531 then {
514532 let periodLenght = value(getInteger(keyPeriodLength()))
515533 let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
516534 let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
517535 makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaim), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght)], SEP)
518536 }
519537 else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaim), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft)], SEP)
520538 $Tuple2(nil, resultString)
521539 }
522540
523541
524542
525543 @Callable(i)
526544 func setManager (pendingManagerPublicKey) = {
527545 let checkCaller = mustManager(i)
528546 if ((checkCaller == checkCaller))
529547 then {
530548 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
531549 if ((checkManagerPublicKey == checkManagerPublicKey))
532550 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
533551 else throw("Strict value is not equal to itself.")
534552 }
535553 else throw("Strict value is not equal to itself.")
536554 }
537555
538556
539557
540558 @Callable(i)
541559 func confirmManager () = {
542560 let pm = pendingManagerPublicKeyOrUnit()
543561 let hasPM = if (isDefined(pm))
544562 then true
545563 else throw("No pending manager")
546564 if ((hasPM == hasPM))
547565 then {
548566 let checkPM = if ((i.callerPublicKey == value(pm)))
549567 then true
550568 else throw("You are not pending manager")
551569 if ((checkPM == checkPM))
552570 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
553571 else throw("Strict value is not equal to itself.")
554572 }
555573 else throw("Strict value is not equal to itself.")
556574 }
557575
558576
559577 @Verifier(tx)
560578 func verify () = {
561579 let targetPublicKey = match managerPublicKeyOrUnit() {
562580 case pk: ByteVector =>
563581 pk
564582 case _: Unit =>
565583 tx.senderPublicKey
566584 case _ =>
567585 throw("Match error")
568586 }
569587 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
570588 }
571589

github/deemru/w8io/026f985 
84.17 ms