tx · 2KFoyBoEN1QSqmexi7Z4j6PbkReDnfCcEBApjJYiFoHF

3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv:  -0.02400000 Waves

2022.11.02 16:26 [2299549] smart account 3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv > SELF 0.00000000 Waves

{ "type": 13, "id": "2KFoyBoEN1QSqmexi7Z4j6PbkReDnfCcEBApjJYiFoHF", "fee": 2400000, "feeAssetId": null, "timestamp": 1667395668254, "version": 1, "sender": "3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv", "senderPublicKey": "39YkRD2qWXTcdNBr4CbDnm8g8SAB2FKVaDeGYahcFHHx", "proofs": [ "2AYyrxHbVBUHMueqh7Qg5sLirxmwRBAp9DoLxFBjsEhNxUjEZJwMW1pgdNmdsJKh3fxMcveFgSZxibGHi5qNwU11" ], "script": "base64:AAIFAAAAAAAADfwIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZmdQc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RvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJjSQEAAAACY0oAAAAABAAAAAJjSwQAAAACYm8JAQAAAAJiUwAAAAADCQAAAQAAAAIFAAAAAmJvAgAAAApCeXRlVmVjdG9yBAAAAAJiWQUAAAACYm8FAAAAAmJZAwkAAAEAAAACBQAAAAJibwIAAAAEVW5pdAgFAAAAAmNJAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACY0kAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJjSQAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmNLSHb+Gw==", "chainId": 84, "height": 2299549, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 323EnozLCPpZvFjr36yYGRNmqhJFwZPD8TsDfZ3ZZnsd Next: ZS1iqKrA77yiCHPZbuBfBNu8jVQzvGzjMZVcAxUHs7S Diff:
OldNewDifferences
224224 let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
225225 let periodLength = value(getInteger(keyPeriodLength()))
226226 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
227- let $t01110111522 = if ((currentPeriod > 0))
228- then $Tuple2(value(getInteger(keyPeriodStartHeight((currentPeriod - 1)))), valueOrElse(getInteger(keyPeriodEndHeight((currentPeriod - 1))), (height + periodLength)))
229- else $Tuple2(valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), (height + periodLength)))
230- let periodStart = $t01110111522._1
231- let periodEnd = $t01110111522._2
232- let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, currentPeriod)), totalPeriodPriceAssetAllowance)
233- let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, currentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
227+ let $t01110112019 = if ((currentPeriod > 0))
228+ then {
229+ let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1))))
230+ let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1))))
231+ let $t01136911751 = if ((height > lastPeriodEndHeight))
232+ then {
233+ let updatedCurrentPeriod = (currentPeriod + 1)
234+ let periodStart = (lastPeriodEndHeight + 1)
235+ let periodEnd = ((periodStart + periodLength) - 1)
236+ $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
237+ }
238+ else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
239+ let updatedCurrentPeriod = $t01136911751._1
240+ let periodStart = $t01136911751._2
241+ let periodEnd = $t01136911751._3
242+ $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
243+ }
244+ else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
245+ let updatedCurrentPeriod = $t01110112019._1
246+ let periodStart = $t01110112019._2
247+ let periodEnd = $t01110112019._3
248+ let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
249+ let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
234250 let availableClaimingPriceAssetAmount = min([totalUserAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim])
235251 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
236252 let putOneTknV2PriceAssetAmount = scale8
237- let $t01217612427 = {
238- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId], nil)
253+ let $t01268712940 = {
254+ let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
239255 if ($isInstanceOf(@, "(Int, Int, Int)"))
240256 then @
241257 else throw("Couldn't cast Any to (Int, Int, Int)")
242258 }
243- if (($t01217612427 == $t01217612427))
259+ if (($t01268712940 == $t01268712940))
244260 then {
245- let bonus = $t01217612427._3
246- let feeAmount = $t01217612427._2
247- let lpAmount = $t01217612427._1
248- let usdtAssetId = value(fromBase58String(value(getString(keyUsdtAssetId()))))
249- let $t01251612734 = {
261+ let bonus = $t01268712940._3
262+ let feeAmount = $t01268712940._2
263+ let lpAmount = $t01268712940._1
264+ let usdtAssetId = value(getString(keyUsdtAssetId()))
265+ let $t01300213220 = {
250266 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
251267 if ($isInstanceOf(@, "(Int, Int)"))
252268 then @
253269 else throw("Couldn't cast Any to (Int, Int)")
254270 }
255- if (($t01251612734 == $t01251612734))
271+ if (($t01300213220 == $t01300213220))
256272 then {
257- let getOneTknV2FeeAmount = $t01251612734._2
258- let usdtAmount = $t01251612734._1
273+ let getOneTknV2FeeAmount = $t01300213220._2
274+ let usdtAmount = $t01300213220._1
259275 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
260276 let endPeriodBlocksLeft = (periodEnd - height)
261277 if ((claimedAssetId58 == priceAssetId58))
262- then $Tuple6([0, -(availableClaimingPriceAssetAmount), availableClaimingPriceAssetAmount, 0], availableClaimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [currentPeriod, periodStart, periodEnd, totalUserAvailableToClaim, claimingIdoAssetAmount, availableClaimingPriceAssetAmount, periodTotalAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft])
278+ then $Tuple6([0, -(availableClaimingPriceAssetAmount), availableClaimingPriceAssetAmount, 0], availableClaimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [updatedCurrentPeriod, periodStart, periodEnd, totalUserAvailableToClaim, claimingIdoAssetAmount, availableClaimingPriceAssetAmount, periodTotalAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft])
263279 else if ((claimedAssetId58 == idoAssetId58))
264- then $Tuple6([0, -(availableClaimingPriceAssetAmount), 0, availableClaimingPriceAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [currentPeriod, periodStart, periodEnd, totalUserAvailableToClaim, claimingIdoAssetAmount, availableClaimingPriceAssetAmount, periodTotalAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft])
280+ then $Tuple6([0, -(availableClaimingPriceAssetAmount), 0, availableClaimingPriceAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [updatedCurrentPeriod, periodStart, periodEnd, totalUserAvailableToClaim, claimingIdoAssetAmount, availableClaimingPriceAssetAmount, periodTotalAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft])
265281 else throwErr(makeString(["unsupported assetId:", claimedAssetId58], " "))
266282 }
267283 else throw("Strict value is not equal to itself.")
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 keyManagerPublicKey () = "%s__managerPublicKey"
124124
125125
126126 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
127127
128128
129129 func readConfigArray () = split(getStringOrFail(keyConfig()), SEP)
130130
131131
132132 func readTotalsArrayOrDefaultByCustomKey (customKey) = split(valueOrElse(getString(customKey), formatInvestorS("0", "0", "0", "0", "0")), SEP)
133133
134134
135135 func readTotalsArrayOrDefault () = readTotalsArrayOrDefaultByCustomKey(keyTotals())
136136
137137
138138 func readInvestorArrayOrDefault (userAddress) = readTotalsArrayOrDefaultByCustomKey(keyInvestor(userAddress))
139139
140140
141141 func readInvestorArrayOrFail (userAddress) = split(getStringOrFail(keyInvestor(userAddress)), SEP)
142142
143143
144144 let IdxDiffTotalIncrement = 0
145145
146146 let IdxDiffRemainingPriceAmountIncrement = 1
147147
148148 let IdxDiffClaimedPriceAmountIncrement = 2
149149
150150 let IdxDiffClaimedIdoAssetAmountIncrement = 3
151151
152152 func TotalsEntry (key,origArray,incrementDiff,newLastClaimedHeight) = {
153153 let totalAmount = parseIntValue(origArray[IdxInvTotalAmount])
154154 let remainingAmount = parseIntValue(origArray[IdxInvRemainingAmount])
155155 let claimedPriceAssetAmount = parseIntValue(origArray[IdxInvClaimedPriceAssetAmount])
156156 let claimedIdoAssetAmount = parseIntValue(origArray[IdxInvClaimedIdoAssetAmount])
157157 let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight])
158158 let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement])
159159 let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement])
160160 let newClaimedPriceAssetAmount = (claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement])
161161 let newClaimedIdoAssetAmount = (claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement])
162162 if ((0 > newRemainingAmount))
163163 then throw("invalid math")
164164 else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight))
165165 }
166166
167167
168168 func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
169169
170170
171171 func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
172172
173173
174174 func internalClaim (claimedAssetId58,userAddress,txId) = {
175175 let cfgArray = readConfigArray()
176176 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
177177 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
178178 let claimEnd = (claimStart + claimDuration)
179179 let price = parseIntValue(cfgArray[IdxCfgPrice])
180180 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
181181 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
182182 let idoAssetId = fromBase58String(idoAssetId58)
183183 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
184184 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
185185 let priceAssetId = fromBase58String(priceAssetId58)
186186 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
187187 let userAddress58 = toString(userAddress)
188188 let origInvestArray = readInvestorArrayOrFail(userAddress58)
189189 let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount])
190190 let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight])
191191 let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP))
192192 then claimStart
193193 else investLastClaimedHeightTMP
194194 let newClaimPeriodHeight = if ((height > claimEnd))
195195 then claimEnd
196196 else if ((claimStart > height))
197197 then claimStart
198198 else height
199199 let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight)
200200 let totalUserAvailableToClaim = fraction(investTotalAmount, claimingBlocks, claimDuration)
201201 let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(totalUserAvailableToClaim, priceAssetMult, price, priceMult, idoAssetMult)
202202 let isUSDN = (claimedAssetId58 == priceAssetId58)
203203 let isUSDNClaimDisabled = valueOrElse(getBoolean(keyUSDNClaimDisabled()), false)
204204 let isUSDNClaimEnded = match getInteger(keyUSDNClaimEndHeight()) {
205205 case end: Int =>
206206 (height > end)
207207 case _: Unit =>
208208 false
209209 case _ =>
210210 throw("Match error")
211211 }
212212 let checks = [if (!(if (isUSDN)
213213 then isUSDNClaimDisabled
214214 else false))
215215 then true
216216 else throwErr("USDN claim is disabled"), if (!(if (isUSDN)
217217 then isUSDNClaimEnded
218218 else false))
219219 then true
220220 else throwErr("USDN claim is ended")]
221221 if ((checks == checks))
222222 then {
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)
227- let $t01110111522 = if ((currentPeriod > 0))
228- then $Tuple2(value(getInteger(keyPeriodStartHeight((currentPeriod - 1)))), valueOrElse(getInteger(keyPeriodEndHeight((currentPeriod - 1))), (height + periodLength)))
229- else $Tuple2(valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), (height + periodLength)))
230- let periodStart = $t01110111522._1
231- let periodEnd = $t01110111522._2
232- let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, currentPeriod)), totalPeriodPriceAssetAllowance)
233- let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, currentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
227+ let $t01110112019 = if ((currentPeriod > 0))
228+ then {
229+ let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1))))
230+ let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1))))
231+ let $t01136911751 = if ((height > lastPeriodEndHeight))
232+ then {
233+ let updatedCurrentPeriod = (currentPeriod + 1)
234+ let periodStart = (lastPeriodEndHeight + 1)
235+ let periodEnd = ((periodStart + periodLength) - 1)
236+ $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
237+ }
238+ else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
239+ let updatedCurrentPeriod = $t01136911751._1
240+ let periodStart = $t01136911751._2
241+ let periodEnd = $t01136911751._3
242+ $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
243+ }
244+ else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
245+ let updatedCurrentPeriod = $t01110112019._1
246+ let periodStart = $t01110112019._2
247+ let periodEnd = $t01110112019._3
248+ let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
249+ let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
234250 let availableClaimingPriceAssetAmount = min([totalUserAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim])
235251 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
236252 let putOneTknV2PriceAssetAmount = scale8
237- let $t01217612427 = {
238- let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId], nil)
253+ let $t01268712940 = {
254+ let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
239255 if ($isInstanceOf(@, "(Int, Int, Int)"))
240256 then @
241257 else throw("Couldn't cast Any to (Int, Int, Int)")
242258 }
243- if (($t01217612427 == $t01217612427))
259+ if (($t01268712940 == $t01268712940))
244260 then {
245- let bonus = $t01217612427._3
246- let feeAmount = $t01217612427._2
247- let lpAmount = $t01217612427._1
248- let usdtAssetId = value(fromBase58String(value(getString(keyUsdtAssetId()))))
249- let $t01251612734 = {
261+ let bonus = $t01268712940._3
262+ let feeAmount = $t01268712940._2
263+ let lpAmount = $t01268712940._1
264+ let usdtAssetId = value(getString(keyUsdtAssetId()))
265+ let $t01300213220 = {
250266 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
251267 if ($isInstanceOf(@, "(Int, Int)"))
252268 then @
253269 else throw("Couldn't cast Any to (Int, Int)")
254270 }
255- if (($t01251612734 == $t01251612734))
271+ if (($t01300213220 == $t01300213220))
256272 then {
257- let getOneTknV2FeeAmount = $t01251612734._2
258- let usdtAmount = $t01251612734._1
273+ let getOneTknV2FeeAmount = $t01300213220._2
274+ let usdtAmount = $t01300213220._1
259275 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
260276 let endPeriodBlocksLeft = (periodEnd - height)
261277 if ((claimedAssetId58 == priceAssetId58))
262- then $Tuple6([0, -(availableClaimingPriceAssetAmount), availableClaimingPriceAssetAmount, 0], availableClaimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [currentPeriod, periodStart, periodEnd, totalUserAvailableToClaim, claimingIdoAssetAmount, availableClaimingPriceAssetAmount, periodTotalAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft])
278+ then $Tuple6([0, -(availableClaimingPriceAssetAmount), availableClaimingPriceAssetAmount, 0], availableClaimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [updatedCurrentPeriod, periodStart, periodEnd, totalUserAvailableToClaim, claimingIdoAssetAmount, availableClaimingPriceAssetAmount, periodTotalAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft])
263279 else if ((claimedAssetId58 == idoAssetId58))
264- then $Tuple6([0, -(availableClaimingPriceAssetAmount), 0, availableClaimingPriceAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [currentPeriod, periodStart, periodEnd, totalUserAvailableToClaim, claimingIdoAssetAmount, availableClaimingPriceAssetAmount, periodTotalAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft])
280+ then $Tuple6([0, -(availableClaimingPriceAssetAmount), 0, availableClaimingPriceAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [updatedCurrentPeriod, periodStart, periodEnd, totalUserAvailableToClaim, claimingIdoAssetAmount, availableClaimingPriceAssetAmount, periodTotalAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft])
265281 else throwErr(makeString(["unsupported assetId:", claimedAssetId58], " "))
266282 }
267283 else throw("Strict value is not equal to itself.")
268284 }
269285 else throw("Strict value is not equal to itself.")
270286 }
271287 else throw("Strict value is not equal to itself.")
272288 }
273289
274290
275291 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
276292 case s: String =>
277293 fromBase58String(s)
278294 case _: Unit =>
279295 unit
280296 case _ =>
281297 throw("Match error")
282298 }
283299
284300
285301 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
286302 case s: String =>
287303 fromBase58String(s)
288304 case _: Unit =>
289305 unit
290306 case _ =>
291307 throw("Match error")
292308 }
293309
294310
295311 func mustManager (i) = {
296312 let pd = throw("Permission denied")
297313 match managerPublicKeyOrUnit() {
298314 case pk: ByteVector =>
299315 if ((i.callerPublicKey == pk))
300316 then true
301317 else pd
302318 case _: Unit =>
303319 if ((i.caller == this))
304320 then true
305321 else pd
306322 case _ =>
307323 throw("Match error")
308324 }
309325 }
310326
311327
312328 @Callable(i)
313329 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
314330 let priceMult = ((100 * 1000) * 1000)
315331 let idoEnd = (idoStart + idoDuration)
316332 if (isDefined(getString(keyConfig())))
317333 then throw("already initialized")
318334 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
319335 then throw("not authorized")
320336 else if ((size(i.payments) != 1))
321337 then throw("exactly 1 payment must be attached")
322338 else if ((idoEnd >= claimStart))
323339 then throw("claimStart must be greater than idoEnd")
324340 else {
325341 let pmt = value(i.payments[0])
326342 let idoAssetId = value(pmt.assetId)
327343 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
328344 let idoAssetId58 = toBase58String(idoAssetId)
329345 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
330346 let priceAssetId = fromBase58String(priceAssetId58)
331347 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
332348 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
333349 let origTotalsArray = readTotalsArrayOrDefault()
334350 let totalsDiff = [0, 0, 0, 0]
335351 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)]
336352 }
337353 }
338354
339355
340356
341357 @Callable(i)
342358 func invest () = {
343359 let cfgArray = readConfigArray()
344360 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
345361 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
346362 let idoEnd = (idoStart + idoDuration)
347363 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
348364 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
349365 let price = parseIntValue(cfgArray[IdxCfgPrice])
350366 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
351367 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
352368 let idoAssetId = fromBase58String(idoAssetId58)
353369 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
354370 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
355371 let priceAssetId = fromBase58String(priceAssetId58)
356372 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
357373 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
358374 let userAddress = toString(i.caller)
359375 if ((idoStart > height))
360376 then throw("ido has not been started yet")
361377 else if ((height > idoEnd))
362378 then throw("ido has been already ended")
363379 else if ((size(i.payments) != 1))
364380 then throw("exactly 1 payment is expected")
365381 else {
366382 let pmt = value(i.payments[0])
367383 let pmtAssetId = value(pmt.assetId)
368384 let pmtAmount = pmt.amount
369385 if ((pmtAssetId != priceAssetId))
370386 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
371387 else {
372388 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
373389 let origTotalsArray = readTotalsArrayOrDefault()
374390 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
375391 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
376392 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
377393 then throw("IDO asset has been - sold consider to use smaller payment")
378394 else {
379395 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
380396 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
381397 }
382398 }
383399 }
384400 }
385401
386402
387403
388404 @Callable(i)
389405 func claim (claimedAssetId58,userAddress58) = {
390406 let callerAddress58 = toString(i.caller)
391407 if ((userAddress58 != callerAddress58))
392408 then throwErr("not authorized")
393409 else {
394410 let priceAssetId = readConfigArray()[IdxCfgPriceAssetId]
395411 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
396412 let totalsDiff = claimResultTuple._1
397413 let outAmount = claimResultTuple._2
398414 let outAssetId = claimResultTuple._3
399415 let origInvestArray = claimResultTuple._4
400416 let newClaimPeriodHeight = claimResultTuple._5
401417 let availableToClaimArray = claimResultTuple._6
402418 let currentPeriod = availableToClaimArray[0]
403419 let periodStart = availableToClaimArray[1]
404420 let periodEnd = availableToClaimArray[2]
405421 let totalUserAvailableToClaim = availableToClaimArray[3]
406422 let periodAvailableIdoAmountToClaim = availableToClaimArray[4]
407423 let periodAvailableUserPriceAmountToClaim = availableToClaimArray[5]
408424 let periodAvailableTotalPriceAmountToClaim = availableToClaimArray[6]
409425 let usdtPriceAssetAllowableRatio = availableToClaimArray[7]
410426 let currentPriceAssetRatio = availableToClaimArray[8]
411427 let endPriodBlocksLeft = availableToClaimArray[9]
412428 let checks = [if (if ((totalUserAvailableToClaim > 0))
413429 then true
414430 else (periodAvailableIdoAmountToClaim > 0))
415431 then true
416432 else throwErr("nothing to claim"), if ((periodAvailableUserPriceAmountToClaim > 0))
417433 then true
418434 else throwErr("unavailable to claim because user period allowance reached"), if ((periodAvailableTotalPriceAmountToClaim > 0))
419435 then true
420436 else throwErr("unavailable to claim because total period allowance reached")]
421437 if ((checks == checks))
422438 then {
423439 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
424440 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
425441 let updatedPeriodTotalAvailableToClaim = (periodAvailableTotalPriceAmountToClaim - claimedPriceAmountFromDiff)
426442 let updatedPeriodUserAvailableToClaim = (periodAvailableUserPriceAmountToClaim - claimedPriceAmountFromDiff)
427443 $Tuple2([ScriptTransfer(i.caller, outAmount, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyCurrentPeriod(), currentPeriod), IntegerEntry(keyPeriodStartHeight(currentPeriod), periodStart), IntegerEntry(keyPeriodEndHeight(currentPeriod), periodEnd), IntegerEntry(keyPeriodTotalAvailableToClaim(priceAssetId, currentPeriod), updatedPeriodTotalAvailableToClaim), IntegerEntry(keyPeriodUserAvailableToClaim(priceAssetId, currentPeriod, userAddress58), updatedPeriodUserAvailableToClaim), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, claimedIdoAssetAmountFromDiff, i.transactionId)], unit)
428444 }
429445 else throw("Strict value is not equal to itself.")
430446 }
431447 }
432448
433449
434450
435451 @Callable(i)
436452 func claimREADONLY (claimedAssetId58,userAddress58) = {
437453 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
438454 let totalsDiff = claimResultTuple._1
439455 let outAmount = claimResultTuple._2
440456 let outAssetId = claimResultTuple._3
441457 let origInvestArray = claimResultTuple._4
442458 let newClaimPeriodHeight = claimResultTuple._5
443459 let availableToClaimArray = claimResultTuple._6
444460 let availableIdoAmountToClaim = availableToClaimArray[4]
445461 let availablePriceAmountToClaim = availableToClaimArray[5]
446462 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
447463 }
448464
449465
450466
451467 @Callable(i)
452468 func claimV2READONLY (claimedAssetId58,userAddress58) = {
453469 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
454470 let totalsDiff = claimResultTuple._1
455471 let outAmount = claimResultTuple._2
456472 let outAssetId = claimResultTuple._3
457473 let origInvestArray = claimResultTuple._4
458474 let newClaimPeriodHeight = claimResultTuple._5
459475 let availableToClaimArray = claimResultTuple._6
460476 let currentPeriod = availableToClaimArray[0]
461477 let periodStart = availableToClaimArray[1]
462478 let periodEnd = availableToClaimArray[2]
463479 let totalUserAvailableToClaim = availableToClaimArray[3]
464480 let periodAvailableIdoAmountToClaim = availableToClaimArray[4]
465481 let periodAvailableUserPriceAmountToClaim = availableToClaimArray[5]
466482 let periodAvailableTotalPriceAmountToClaim = availableToClaimArray[6]
467483 let usdtPriceAssetAllowableRatio = availableToClaimArray[7]
468484 let currentPriceAssetRatio = availableToClaimArray[8]
469485 let endPriodBlocksLeft = availableToClaimArray[9]
470486 let resultString = makeString(["%d%d%d%d%d%d%d", toString(totalUserAvailableToClaim), toString(periodAvailableIdoAmountToClaim), toString(periodAvailableUserPriceAmountToClaim), toString(periodAvailableTotalPriceAmountToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentPriceAssetRatio), toString(endPriodBlocksLeft)], SEP)
471487 $Tuple2(nil, resultString)
472488 }
473489
474490
475491
476492 @Callable(i)
477493 func setManager (pendingManagerPublicKey) = {
478494 let checkCaller = mustManager(i)
479495 if ((checkCaller == checkCaller))
480496 then {
481497 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
482498 if ((checkManagerPublicKey == checkManagerPublicKey))
483499 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
484500 else throw("Strict value is not equal to itself.")
485501 }
486502 else throw("Strict value is not equal to itself.")
487503 }
488504
489505
490506
491507 @Callable(i)
492508 func confirmManager () = {
493509 let pm = pendingManagerPublicKeyOrUnit()
494510 let hasPM = if (isDefined(pm))
495511 then true
496512 else throw("No pending manager")
497513 if ((hasPM == hasPM))
498514 then {
499515 let checkPM = if ((i.callerPublicKey == value(pm)))
500516 then true
501517 else throw("You are not pending manager")
502518 if ((checkPM == checkPM))
503519 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
504520 else throw("Strict value is not equal to itself.")
505521 }
506522 else throw("Strict value is not equal to itself.")
507523 }
508524
509525
510526 @Verifier(tx)
511527 func verify () = {
512528 let targetPublicKey = match managerPublicKeyOrUnit() {
513529 case pk: ByteVector =>
514530 pk
515531 case _: Unit =>
516532 tx.senderPublicKey
517533 case _ =>
518534 throw("Match error")
519535 }
520536 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
521537 }
522538

github/deemru/w8io/026f985 
70.24 ms