tx · BwicfDdMU8oKaavGKefJs56KnxvhVL5TvbPWRtdHAeTe

3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv:  -0.02600000 Waves

2022.11.03 13:03 [2300790] smart account 3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv > SELF 0.00000000 Waves

{ "type": 13, "id": "BwicfDdMU8oKaavGKefJs56KnxvhVL5TvbPWRtdHAeTe", "fee": 2600000, "feeAssetId": null, "timestamp": 1667469883307, "version": 1, "sender": "3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv", "senderPublicKey": "39YkRD2qWXTcdNBr4CbDnm8g8SAB2FKVaDeGYahcFHHx", "proofs": [ "5Lxjrt9RZ6AbYESXYuT8ZUze1YMRg2XKAaxot1CFCPvM5DVRJNunGDq2tPVN1XjR44yFW8nd5RfRWMauBsRR1HHc" ], "script": "base64:AAIFAAAAAAAADwUIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZmdQcmljZU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gUAAAACY2ICAAAABFVuaXQIBQAAAAJjVwAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmNXAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACY1cAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJjWQiHKjk=", "chainId": 84, "height": 2300790, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9C1fbMk4EQk1FgRcWKWGPYnrfL9DRAAJo7LA6opPpqfX Next: Bkaq5zT56aMXeHzub7RL3Rpvi2LvsA6AxpfvSrmL5vAN Diff:
OldNewDifferences
511511 let cfgArray = readConfigArray()
512512 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
513513 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
514- let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalance)
515- let $t02712027532 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
516- let periodMinAvailableToClaim = $t02712027532._1
517- let periodTotalAvailableToClaim = $t02712027532._2
518- let periodUserAvailableToClaim = $t02712027532._3
519- let totalUserAvailableToClaim = $t02712027532._4
520- let usdtPriceAssetAllowableRatio = $t02712027532._5
521- let currentUsdtPriceAssetRatio = $t02712027532._6
522- let endPeriodBlocksLeft = $t02712027532._7
523- let updatedCurrentPeriod = $t02712027532._8
524- let periodStart = $t02712027532._9
525- let periodEnd = $t02712027532._10
514+ let priceAssetDecimals = value(assetInfo(fromBase64String(claimedAssetId58))).decimals
515+ let priceAssetBalanceEightDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN))
516+ let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceEightDecimals)
517+ let $t02734327755 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
518+ let periodMinAvailableToClaim = $t02734327755._1
519+ let periodTotalAvailableToClaim = $t02734327755._2
520+ let periodUserAvailableToClaim = $t02734327755._3
521+ let totalUserAvailableToClaim = $t02734327755._4
522+ let usdtPriceAssetAllowableRatio = $t02734327755._5
523+ let currentUsdtPriceAssetRatio = $t02734327755._6
524+ let endPeriodBlocksLeft = $t02734327755._7
525+ let updatedCurrentPeriod = $t02734327755._8
526+ let periodStart = $t02734327755._9
527+ let periodEnd = $t02734327755._10
526528 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
527529 let resultString = if ((height > currentPeriodEndHeight))
528530 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 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])
277277 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
278278 let putOneTknV2PriceAssetAmount = scale8
279279 let $t01446014713 = {
280280 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
281281 if ($isInstanceOf(@, "(Int, Int, Int)"))
282282 then @
283283 else throw("Couldn't cast Any to (Int, Int, Int)")
284284 }
285285 if (($t01446014713 == $t01446014713))
286286 then {
287287 let bonus = $t01446014713._3
288288 let feeAmount = $t01446014713._2
289289 let lpAmount = $t01446014713._1
290290 let usdtAssetId = value(getString(keyUsdtAssetId()))
291291 let $t01477514993 = {
292292 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
293293 if ($isInstanceOf(@, "(Int, Int)"))
294294 then @
295295 else throw("Couldn't cast Any to (Int, Int)")
296296 }
297297 if (($t01477514993 == $t01477514993))
298298 then {
299299 let getOneTknV2FeeAmount = $t01477514993._2
300300 let usdtAmount = $t01477514993._1
301301 let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8)
302302 let endPeriodBlocksLeft = (periodEnd - height)
303303 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
304304 }
305305 else throw("Strict value is not equal to itself.")
306306 }
307307 else throw("Strict value is not equal to itself.")
308308 }
309309
310310
311311 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
312312 case s: String =>
313313 fromBase58String(s)
314314 case _: Unit =>
315315 unit
316316 case _ =>
317317 throw("Match error")
318318 }
319319
320320
321321 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
322322 case s: String =>
323323 fromBase58String(s)
324324 case _: Unit =>
325325 unit
326326 case _ =>
327327 throw("Match error")
328328 }
329329
330330
331331 func mustManager (i) = {
332332 let pd = throw("Permission denied")
333333 match managerPublicKeyOrUnit() {
334334 case pk: ByteVector =>
335335 if ((i.callerPublicKey == pk))
336336 then true
337337 else pd
338338 case _: Unit =>
339339 if ((i.caller == this))
340340 then true
341341 else pd
342342 case _ =>
343343 throw("Match error")
344344 }
345345 }
346346
347347
348348 @Callable(i)
349349 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
350350 let priceMult = ((100 * 1000) * 1000)
351351 let idoEnd = (idoStart + idoDuration)
352352 if (isDefined(getString(keyConfig())))
353353 then throw("already initialized")
354354 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
355355 then throw("not authorized")
356356 else if ((size(i.payments) != 1))
357357 then throw("exactly 1 payment must be attached")
358358 else if ((idoEnd >= claimStart))
359359 then throw("claimStart must be greater than idoEnd")
360360 else {
361361 let pmt = value(i.payments[0])
362362 let idoAssetId = value(pmt.assetId)
363363 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
364364 let idoAssetId58 = toBase58String(idoAssetId)
365365 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
366366 let priceAssetId = fromBase58String(priceAssetId58)
367367 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
368368 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
369369 let origTotalsArray = readTotalsArrayOrDefault()
370370 let totalsDiff = [0, 0, 0, 0]
371371 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)]
372372 }
373373 }
374374
375375
376376
377377 @Callable(i)
378378 func invest () = {
379379 let cfgArray = readConfigArray()
380380 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
381381 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
382382 let idoEnd = (idoStart + idoDuration)
383383 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
384384 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
385385 let price = parseIntValue(cfgArray[IdxCfgPrice])
386386 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
387387 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
388388 let idoAssetId = fromBase58String(idoAssetId58)
389389 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
390390 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
391391 let priceAssetId = fromBase58String(priceAssetId58)
392392 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
393393 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
394394 let userAddress = toString(i.caller)
395395 if ((idoStart > height))
396396 then throw("ido has not been started yet")
397397 else if ((height > idoEnd))
398398 then throw("ido has been already ended")
399399 else if ((size(i.payments) != 1))
400400 then throw("exactly 1 payment is expected")
401401 else {
402402 let pmt = value(i.payments[0])
403403 let pmtAssetId = value(pmt.assetId)
404404 let pmtAmount = pmt.amount
405405 if ((pmtAssetId != priceAssetId))
406406 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
407407 else {
408408 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
409409 let origTotalsArray = readTotalsArrayOrDefault()
410410 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
411411 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
412412 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
413413 then throw("IDO asset has been - sold consider to use smaller payment")
414414 else {
415415 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
416416 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
417417 }
418418 }
419419 }
420420 }
421421
422422
423423
424424 @Callable(i)
425425 func claim (claimedAssetId58,userAddress58) = {
426426 let callerAddress58 = toString(i.caller)
427427 if ((userAddress58 != callerAddress58))
428428 then throw("not authorized")
429429 else {
430430 let cfgArray = readConfigArray()
431431 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
432432 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
433433 let totalsDiff = claimResultTuple._1
434434 let outAmount = claimResultTuple._2
435435 let outAssetId = claimResultTuple._3
436436 let origInvestArray = claimResultTuple._4
437437 let newClaimPeriodHeight = claimResultTuple._5
438438 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
439439 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
440440 let entries = if ((claimedAssetId58 == priceAssetId58))
441441 then {
442442 let $t02064921093 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
443443 let periodMinAvailableToClaim = $t02064921093._1
444444 let periodTotalAvailableToClaim = $t02064921093._2
445445 let periodUserAvailableToClaim = $t02064921093._3
446446 let totalUserAvailableToClaim = $t02064921093._4
447447 let usdtPriceAssetAllowableRatio = $t02064921093._5
448448 let currentUsdtPriceAssetRatio = $t02064921093._6
449449 let endPeriodBlocksLeft = $t02064921093._7
450450 let updatedCurrentPeriod = $t02064921093._8
451451 let periodStart = $t02064921093._9
452452 let periodEnd = $t02064921093._10
453453 let checks = [if ((periodUserAvailableToClaim > 0))
454454 then true
455455 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
456456 then true
457457 else throwErr("unavailable to claim because total period allowance reached"), if ((periodMinAvailableToClaim > 0))
458458 then true
459459 else throwErr("nothing to claim"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio))
460460 then true
461461 else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")]
462462 if ((checks == checks))
463463 then {
464464 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
465465 let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim)
466466 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
467467 let entries = if ((priceAssetBalance >= periodMinAvailableToClaim))
468468 then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
469469 else {
470470 let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
471471 [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)]
472472 }
473473 $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)
474474 }
475475 else throw("Strict value is not equal to itself.")
476476 }
477477 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)
478478 entries
479479 }
480480 }
481481
482482
483483
484484 @Callable(i)
485485 func claimREADONLY (claimedAssetId58,userAddress58) = {
486486 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
487487 let totalsDiff = claimResultTuple._1
488488 let outAmount = claimResultTuple._2
489489 let outAssetId = claimResultTuple._3
490490 let origInvestArray = claimResultTuple._4
491491 let newClaimPeriodHeight = claimResultTuple._5
492492 let availableToClaimArray = claimResultTuple._6
493493 let availablePriceAmountToClaim = availableToClaimArray[0]
494494 let availableIdoAmountToClaim = availableToClaimArray[1]
495495 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
496496 }
497497
498498
499499
500500 @Callable(i)
501501 func claimV2READONLY (claimedAssetId58,userAddress58) = {
502502 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
503503 let totalsDiff = claimResultTuple._1
504504 let outAmount = claimResultTuple._2
505505 let outAssetId = claimResultTuple._3
506506 let origInvestArray = claimResultTuple._4
507507 let newClaimPeriodHeight = claimResultTuple._5
508508 let availableToClaimArray = claimResultTuple._6
509509 let availablePriceAmountToClaim = availableToClaimArray[0]
510510 let availableIdoAmountToClaim = availableToClaimArray[1]
511511 let cfgArray = readConfigArray()
512512 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
513513 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
514- let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalance)
515- let $t02712027532 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
516- let periodMinAvailableToClaim = $t02712027532._1
517- let periodTotalAvailableToClaim = $t02712027532._2
518- let periodUserAvailableToClaim = $t02712027532._3
519- let totalUserAvailableToClaim = $t02712027532._4
520- let usdtPriceAssetAllowableRatio = $t02712027532._5
521- let currentUsdtPriceAssetRatio = $t02712027532._6
522- let endPeriodBlocksLeft = $t02712027532._7
523- let updatedCurrentPeriod = $t02712027532._8
524- let periodStart = $t02712027532._9
525- let periodEnd = $t02712027532._10
514+ let priceAssetDecimals = value(assetInfo(fromBase64String(claimedAssetId58))).decimals
515+ let priceAssetBalanceEightDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN))
516+ let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceEightDecimals)
517+ let $t02734327755 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
518+ let periodMinAvailableToClaim = $t02734327755._1
519+ let periodTotalAvailableToClaim = $t02734327755._2
520+ let periodUserAvailableToClaim = $t02734327755._3
521+ let totalUserAvailableToClaim = $t02734327755._4
522+ let usdtPriceAssetAllowableRatio = $t02734327755._5
523+ let currentUsdtPriceAssetRatio = $t02734327755._6
524+ let endPeriodBlocksLeft = $t02734327755._7
525+ let updatedCurrentPeriod = $t02734327755._8
526+ let periodStart = $t02734327755._9
527+ let periodEnd = $t02734327755._10
526528 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
527529 let resultString = if ((height > currentPeriodEndHeight))
528530 then {
529531 let periodLenght = value(getInteger(keyPeriodLength()))
530532 let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
531533 let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
532534 makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght), toString(availableIdoAmountToClaim), keyPriceAssetBalance(userAddress58), toString(priceAssetBalance)], SEP)
533535 }
534536 else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft), toString(availableIdoAmountToClaim), keyPriceAssetBalance(userAddress58), toString(priceAssetBalance)], SEP)
535537 $Tuple2(nil, resultString)
536538 }
537539
538540
539541
540542 @Callable(i)
541543 func setManager (pendingManagerPublicKey) = {
542544 let checkCaller = mustManager(i)
543545 if ((checkCaller == checkCaller))
544546 then {
545547 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
546548 if ((checkManagerPublicKey == checkManagerPublicKey))
547549 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
548550 else throw("Strict value is not equal to itself.")
549551 }
550552 else throw("Strict value is not equal to itself.")
551553 }
552554
553555
554556
555557 @Callable(i)
556558 func confirmManager () = {
557559 let pm = pendingManagerPublicKeyOrUnit()
558560 let hasPM = if (isDefined(pm))
559561 then true
560562 else throw("No pending manager")
561563 if ((hasPM == hasPM))
562564 then {
563565 let checkPM = if ((i.callerPublicKey == value(pm)))
564566 then true
565567 else throw("You are not pending manager")
566568 if ((checkPM == checkPM))
567569 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
568570 else throw("Strict value is not equal to itself.")
569571 }
570572 else throw("Strict value is not equal to itself.")
571573 }
572574
573575
574576 @Verifier(tx)
575577 func verify () = {
576578 let targetPublicKey = match managerPublicKeyOrUnit() {
577579 case pk: ByteVector =>
578580 pk
579581 case _: Unit =>
580582 tx.senderPublicKey
581583 case _ =>
582584 throw("Match error")
583585 }
584586 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
585587 }
586588

github/deemru/w8io/026f985 
63.88 ms