tx · 66bMEiSNmpTttXxVkdFTYByADvqAa69uZAg3M3HSECZJ

3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp:  -0.02200000 Waves

2022.12.02 10:43 [2342441] smart account 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp > SELF 0.00000000 Waves

{ "type": 13, "id": "66bMEiSNmpTttXxVkdFTYByADvqAa69uZAg3M3HSECZJ", "fee": 2200000, "feeAssetId": null, "timestamp": 1669967098632, "version": 1, "sender": "3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp", "senderPublicKey": "bS6Cchmk25EdDcapkz8W5WkZgthTHHW6sSBbcidSrCb", "proofs": [ "62u2uEJ8gtYNuv1sYEcMkMMgcpa4Pg84mmeGvdoQrHZxBGeRJs8MnngKdCpbhD5UdXQRiy7vFmSmsYNLDeCm1xq9" ], "script": "base64:BgKCIwgCEgkKBwEBAQEBCAESABIECgIICBIDCgEIEgQKAggIEgQKAggIEgMKAQgSACIPZ2V0U3RyaW5nT3JGYWlsIgNrZXkiA1NFUCIIQlVGU0NBTEUiBnNjYWxlOCIIdGhyb3dFcnIiA21zZyIIYXNTdHJpbmciA3ZhbCIHJG1hdGNoMCIGdmFsU3RyIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnU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qCQDMCAIJAKQDAQUCY2sJAMwIAgkApAMBBQJkcQUDbmlsBQFjCQCUCgIFA25pbAUCZHICY3ABCnNldE1hbmFnZXIBAmR2BAJkdwkBAmNvAQUCY3ADCQAAAgUCZHcFAmR3BAJkeAkA2QQBBQJkdgMJAAACBQJkeAUCZHgJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAmFJAAUCZHYFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJjcAEOY29uZmlybU1hbmFnZXIABAJkeQkBAmNuAAQCZHoDCQEJaXNEZWZpbmVkAQUCZHkGCQACAQISTm8gcGVuZGluZyBtYW5hZ2VyAwkAAAIFAmR6BQJkegQCZEEDCQAAAggFAmNwD2NhbGxlclB1YmxpY0tleQkBBXZhbHVlAQUCZHkGCQACAQIbWW91IGFyZSBub3QgcGVuZGluZyBtYW5hZ2VyAwkAAAIFAmRBBQJkQQkAzAgCCQELU3RyaW5nRW50cnkCCQECYUgACQDYBAEJAQV2YWx1ZQEFAmR5CQDMCAIJAQtEZWxldGVFbnRyeQEJAQJhSQAFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECZEIBAmRDAAQCZEQEAWoJAQJjbAADCQABAgUBagIKQnl0ZVZlY3RvcgQCY3IFAWoFAmNyAwkAAQIFAWoCBFVuaXQIBQJkQg9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZEIJYm9keUJ5dGVzCQCRAwIIBQJkQgZwcm9vZnMAAAUCZETxtBIv", "chainId": 84, "height": 2342441, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FBnvd9wju4u8exKCUSZX2CocWf9DoQd6ocASMC4ohFr8 Next: A9XvVLTXQcidGztVM8Fw4W5rFCvCDKZ5s3dUYULbPCWR Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
305305 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
306306 if ($isInstanceOf(@, "(Int, Int, Int)"))
307307 then @
308- else throw("Couldn't cast Any to (Int, Int, Int)")
308+ else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)"))
309309 }
310310 if (($t01561215865 == $t01561215865))
311311 then {
317317 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
318318 if ($isInstanceOf(@, "(Int, Int)"))
319319 then @
320- else throw("Couldn't cast Any to (Int, Int)")
320+ else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
321321 }
322322 if (($t01592716145 == $t01592716145))
323323 then {
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
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 asString (val) = match val {
1717 case valStr: String =>
1818 valStr
1919 case _ =>
2020 throw("fail to cast into String")
2121 }
2222
2323
2424 func convertPriceAssetIntoIdoAsset (priceAssetAmount,priceAssetMULT,price,priceMULT,idoAssetMULT) = {
2525 let bPriceAssetMULT = toBigInt(priceAssetMULT)
2626 let bIdoAssetMULT = toBigInt(idoAssetMULT)
2727 let bPriceAssetBUF = fraction(toBigInt(priceAssetAmount), BUFSCALE, bPriceAssetMULT)
2828 let bAmountAssetBUF = fraction(bPriceAssetBUF, toBigInt(priceMULT), toBigInt(price))
2929 toInt(fraction(bAmountAssetBUF, toBigInt(idoAssetMULT), BUFSCALE))
3030 }
3131
3232
3333 let IdxCfgIdoStart = 1
3434
3535 let IdxCfgIdoDuration = 2
3636
3737 let IdxCfgClaimStart = 3
3838
3939 let IdxCfgClaimDuration = 4
4040
4141 let IdxCfgPrice = 5
4242
4343 let IdxCfgPriceMult = 6
4444
4545 let IdxCfgIdoAssetId = 7
4646
4747 let IdxCfgIdoAssetMult = 8
4848
4949 let IdxCfgPriceAssetId = 9
5050
5151 let IdxCfgPriceAssetMult = 10
5252
5353 let IdxCfgMinInvestAmount = 11
5454
5555 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)
5656
5757
5858 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))
5959
6060
6161 let IdxInvTotalAmount = 1
6262
6363 let IdxInvRemainingAmount = 2
6464
6565 let IdxInvClaimedPriceAssetAmount = 3
6666
6767 let IdxInvClaimedIdoAssetAmount = 4
6868
6969 let IdxInvLastClaimedHeight = 5
7070
7171 func formatInvestorS (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, claimedPriceAssetAmount, claimedIdoAssetAmount, lastClaimedHeight], SEP)
7272
7373
7474 func formatInvestor (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = formatInvestorS(toString(totalAmount), toString(remainingAmount), toString(claimedPriceAssetAmount), toString(claimedIdoAssetAmount), toString(lastClaimedHeight))
7575
7676
7777 func formatHistoryRecord (priceAssetAmount,idoAssetAmount) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(priceAssetAmount), toString(idoAssetAmount)], SEP)
7878
7979
8080 func keyConfig () = "%s__config"
8181
8282
8383 func keyInvestor (userAddress) = ("%s__" + userAddress)
8484
8585
8686 func keyTotals () = "%s__totals"
8787
8888
8989 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
9090
9191
9292 func keyUSDNClaimDisabled () = "%s__usdnClaimDisabled"
9393
9494
9595 func keyUSDNClaimEndHeight () = "%s__usdnClaimEndHeight"
9696
9797
9898 func keyPeriodLength () = makeString(["%s", "periodLength"], SEP)
9999
100100
101101 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
102102
103103
104104 func keyPeriodStartHeight (periodNum) = makeString(["%s%s", "periodStartHeight", toString(periodNum)], SEP)
105105
106106
107107 func keyPeriodEndHeight (periodNum) = makeString(["%s%s", "periodEndHeight", toString(periodNum)], SEP)
108108
109109
110110 func keyUsdtPriceAssetAllowableRatio () = makeString(["%s", "usdtPriceAssetAllowableRatio"], SEP)
111111
112112
113113 func keyTotalPeriodAllowance (assetId) = makeString(["%s%s", "totalPeriodAllowance", assetId], SEP)
114114
115115
116116 func keyUserPeriodAllowance (assetId) = makeString(["%s%s", "userPeriodAllowance", assetId], SEP)
117117
118118
119119 func keyPeriodTotalAvailableToClaim (assetId,periodNum) = makeString(["%s%s%s", "periodTotalAvailableToClaim", assetId, toString(periodNum)], SEP)
120120
121121
122122 func keyPeriodUserAvailableToClaim (assetId,periodNum,userAddress) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", assetId, toString(periodNum), userAddress], SEP)
123123
124124
125125 func keyUsdtPriceAssetStablePool () = makeString(["%s", "usdtPriceAssetStablePool"], SEP)
126126
127127
128128 func keyUsdtAssetId () = makeString(["%s", "usdtAssetId"], SEP)
129129
130130
131131 func keyPriceAssetBalance (address) = makeString(["%s%s", "priceAssetBalance", address], SEP)
132132
133133
134134 func keyInvestorRemainingAmount (address) = makeString(["%s%s", "investorRemainingAmount", address], SEP)
135135
136136
137137 func keyTotalRemainingAmount () = makeString(["%s", "totalRemainingAmount"], SEP)
138138
139139
140140 func keyManagerPublicKey () = "%s__managerPublicKey"
141141
142142
143143 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
144144
145145
146146 func readConfigArray () = split(getStringOrFail(keyConfig()), SEP)
147147
148148
149149 func readTotalsArrayOrDefaultByCustomKey (customKey) = split(valueOrElse(getString(customKey), formatInvestorS("0", "0", "0", "0", "0")), SEP)
150150
151151
152152 func readTotalsArrayOrDefault () = readTotalsArrayOrDefaultByCustomKey(keyTotals())
153153
154154
155155 func readInvestorArrayOrDefault (userAddress) = readTotalsArrayOrDefaultByCustomKey(keyInvestor(userAddress))
156156
157157
158158 func readInvestorArrayOrFail (userAddress) = split(getStringOrFail(keyInvestor(userAddress)), SEP)
159159
160160
161161 let IdxDiffTotalIncrement = 0
162162
163163 let IdxDiffRemainingPriceAmountIncrement = 1
164164
165165 let IdxDiffClaimedPriceAmountIncrement = 2
166166
167167 let IdxDiffClaimedIdoAssetAmountIncrement = 3
168168
169169 func TotalsEntry (key,origArray,incrementDiff,newLastClaimedHeight,priceAssetBalance) = {
170170 let totalAmount = parseIntValue(origArray[IdxInvTotalAmount])
171171 let remainingAmount = parseIntValue(origArray[IdxInvRemainingAmount])
172172 let claimedPriceAssetAmount = parseIntValue(origArray[IdxInvClaimedPriceAssetAmount])
173173 let claimedIdoAssetAmount = parseIntValue(origArray[IdxInvClaimedIdoAssetAmount])
174174 let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight])
175175 let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement])
176176 let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement])
177177 let cfgArray = readConfigArray()
178178 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
179179 let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals
180180 let priceAssetBalancePriceAssetDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN))
181181 let newClaimedPriceAssetAmount = ((claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement]) - priceAssetBalance)
182182 let newClaimedIdoAssetAmount = ((claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) + priceAssetBalancePriceAssetDecimals)
183183 let entries = if ((0 > newRemainingAmount))
184184 then {
185185 let diff = ((newTotalAmount - newClaimedPriceAssetAmount) - newClaimedIdoAssetAmount)
186186 let newLogicRemainingAmount = if ((0 > diff))
187187 then 0
188188 else diff
189189 StringEntry(key, formatInvestor(newTotalAmount, newLogicRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight))
190190 }
191191 else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight))
192192 entries
193193 }
194194
195195
196196 func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
197197
198198
199199 func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount))
200200
201201
202202 func internalClaim (claimedAssetId58,userAddress,txId) = {
203203 let cfgArray = readConfigArray()
204204 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
205205 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
206206 let claimEnd = (claimStart + claimDuration)
207207 let price = parseIntValue(cfgArray[IdxCfgPrice])
208208 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
209209 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
210210 let idoAssetId = fromBase58String(idoAssetId58)
211211 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
212212 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
213213 let priceAssetId = fromBase58String(priceAssetId58)
214214 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
215215 let userAddress58 = toString(userAddress)
216216 let origInvestArray = readInvestorArrayOrFail(userAddress58)
217217 let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount])
218218 let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight])
219219 let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP))
220220 then claimStart
221221 else investLastClaimedHeightTMP
222222 let newClaimPeriodHeight = if ((height > claimEnd))
223223 then claimEnd
224224 else if ((claimStart > height))
225225 then claimStart
226226 else height
227227 let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight)
228228 let claimingPriceAssetAmount = fraction(investTotalAmount, claimingBlocks, claimDuration)
229229 let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult)
230230 let isUSDN = (claimedAssetId58 == priceAssetId58)
231231 let isUSDNClaimDisabled = valueOrElse(getBoolean(keyUSDNClaimDisabled()), false)
232232 let checks = [if (!(if (isUSDN)
233233 then isUSDNClaimDisabled
234234 else false))
235235 then true
236236 else throw("USDN claim is disabled")]
237237 if ((checks == checks))
238238 then if ((claimedAssetId58 == priceAssetId58))
239239 then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
240240 else if ((claimedAssetId58 == idoAssetId58))
241241 then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount])
242242 else throw(("unsupported assetId: " + claimedAssetId58))
243243 else throw("Strict value is not equal to itself.")
244244 }
245245
246246
247247 func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = {
248248 let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
249249 let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
250250 let periodLength = value(getInteger(keyPeriodLength()))
251251 let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0)
252252 let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0)))
253253 let $t01298714857 = if ((currentPeriod > 0))
254254 then {
255255 let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod)))
256256 let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod)))
257257 let $t01324713952 = if ((height > lastPeriodEndHeight))
258258 then {
259259 let updatedCurrentPeriod = (currentPeriod + 1)
260260 let periodStart = if ((height > (lastPeriodEndHeight + periodLength)))
261261 then {
262262 let blocksToLastPeriodStart = ((height - lastPeriodEndHeight) % periodLength)
263263 if ((blocksToLastPeriodStart == 0))
264264 then ((height - periodLength) + 1)
265265 else (height - blocksToLastPeriodStart)
266266 }
267267 else (lastPeriodEndHeight + 1)
268268 let periodEnd = ((periodStart + periodLength) - 1)
269269 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
270270 }
271271 else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight)
272272 let updatedCurrentPeriod = $t01324713952._1
273273 let periodStart = $t01324713952._2
274274 let periodEnd = $t01324713952._3
275275 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
276276 }
277277 else if (zeroPeriodEndHeighIsDefined)
278278 then {
279279 let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0)))
280280 let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0)))
281281 let $t01420714589 = if ((height > zeroPeriodEndHeight))
282282 then {
283283 let updatedCurrentPeriod = (currentPeriod + 1)
284284 let periodStart = (zeroPeriodEndHeight + 1)
285285 let periodEnd = ((periodStart + periodLength) - 1)
286286 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
287287 }
288288 else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight)
289289 let updatedCurrentPeriod = $t01420714589._1
290290 let periodStart = $t01420714589._2
291291 let periodEnd = $t01420714589._3
292292 $Tuple3(updatedCurrentPeriod, periodStart, periodEnd)
293293 }
294294 else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1)))
295295 let updatedCurrentPeriod = $t01298714857._1
296296 let periodStart = $t01298714857._2
297297 let periodEnd = $t01298714857._3
298298 let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance)
299299 let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance)
300300 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
301301 let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim])
302302 let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio()))
303303 let putOneTknV2PriceAssetAmount = scale8
304304 let $t01561215865 = {
305305 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil)
306306 if ($isInstanceOf(@, "(Int, Int, Int)"))
307307 then @
308- else throw("Couldn't cast Any to (Int, Int, Int)")
308+ else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)"))
309309 }
310310 if (($t01561215865 == $t01561215865))
311311 then {
312312 let bonus = $t01561215865._3
313313 let feeAmount = $t01561215865._2
314314 let lpAmount = $t01561215865._1
315315 let usdtAssetId = value(getString(keyUsdtAssetId()))
316316 let $t01592716145 = {
317317 let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil)
318318 if ($isInstanceOf(@, "(Int, Int)"))
319319 then @
320- else throw("Couldn't cast Any to (Int, Int)")
320+ else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
321321 }
322322 if (($t01592716145 == $t01592716145))
323323 then {
324324 let getOneTknV2FeeAmount = $t01592716145._2
325325 let usdtAmount = $t01592716145._1
326326 let currentUsdtPriceAssetRatio = fraction(putOneTknV2PriceAssetAmount, scale8, usdtAmount)
327327 let endPeriodBlocksLeft = (periodEnd - height)
328328 $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd)
329329 }
330330 else throw("Strict value is not equal to itself.")
331331 }
332332 else throw("Strict value is not equal to itself.")
333333 }
334334
335335
336336 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
337337 case s: String =>
338338 fromBase58String(s)
339339 case _: Unit =>
340340 unit
341341 case _ =>
342342 throw("Match error")
343343 }
344344
345345
346346 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
347347 case s: String =>
348348 fromBase58String(s)
349349 case _: Unit =>
350350 unit
351351 case _ =>
352352 throw("Match error")
353353 }
354354
355355
356356 func mustManager (i) = {
357357 let pd = throw("Permission denied")
358358 match managerPublicKeyOrUnit() {
359359 case pk: ByteVector =>
360360 if ((i.callerPublicKey == pk))
361361 then true
362362 else pd
363363 case _: Unit =>
364364 if ((i.caller == this))
365365 then true
366366 else pd
367367 case _ =>
368368 throw("Match error")
369369 }
370370 }
371371
372372
373373 @Callable(i)
374374 func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = {
375375 let priceMult = ((100 * 1000) * 1000)
376376 let idoEnd = (idoStart + idoDuration)
377377 if (isDefined(getString(keyConfig())))
378378 then throw("already initialized")
379379 else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller)))
380380 then throw("not authorized")
381381 else if ((size(i.payments) != 1))
382382 then throw("exactly 1 payment must be attached")
383383 else if ((idoEnd >= claimStart))
384384 then throw("claimStart must be greater than idoEnd")
385385 else {
386386 let pmt = value(i.payments[0])
387387 let idoAssetId = value(pmt.assetId)
388388 let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info")
389389 let idoAssetId58 = toBase58String(idoAssetId)
390390 let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN)
391391 let priceAssetId = fromBase58String(priceAssetId58)
392392 let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info")
393393 let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN)
394394 let origTotalsArray = readTotalsArrayOrDefault()
395395 let totalsDiff = [0, 0, 0, 0]
396396 [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart, 0)]
397397 }
398398 }
399399
400400
401401
402402 @Callable(i)
403403 func invest () = {
404404 let cfgArray = readConfigArray()
405405 let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart])
406406 let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration])
407407 let idoEnd = (idoStart + idoDuration)
408408 let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart])
409409 let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration])
410410 let price = parseIntValue(cfgArray[IdxCfgPrice])
411411 let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult])
412412 let idoAssetId58 = cfgArray[IdxCfgIdoAssetId]
413413 let idoAssetId = fromBase58String(idoAssetId58)
414414 let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult])
415415 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
416416 let priceAssetId = fromBase58String(priceAssetId58)
417417 let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult])
418418 let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount])
419419 let userAddress = toString(i.caller)
420420 if ((idoStart > height))
421421 then throw("ido has not been started yet")
422422 else if ((height > idoEnd))
423423 then throw("ido has been already ended")
424424 else if ((size(i.payments) != 1))
425425 then throw("exactly 1 payment is expected")
426426 else {
427427 let pmt = value(i.payments[0])
428428 let pmtAssetId = value(pmt.assetId)
429429 let pmtAmount = pmt.amount
430430 if ((pmtAssetId != priceAssetId))
431431 then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected"))
432432 else {
433433 let origInvestorArray = readInvestorArrayOrDefault(userAddress)
434434 let origTotalsArray = readTotalsArrayOrDefault()
435435 let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount)
436436 let requiredIdoAssetAmount = (newPriceTotalAmount * 100)
437437 if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId)))
438438 then throw("IDO asset has been - sold consider to use smaller payment")
439439 else {
440440 let totalsDiff = [pmtAmount, pmtAmount, 0, 0]
441441 [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart, 0), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart, 0), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)]
442442 }
443443 }
444444 }
445445 }
446446
447447
448448
449449 @Callable(i)
450450 func claim (claimedAssetId58,userAddress58) = {
451451 let callerAddress58 = toString(i.caller)
452452 if ((userAddress58 != callerAddress58))
453453 then throw("not authorized")
454454 else {
455455 let cfgArray = readConfigArray()
456456 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
457457 let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId)
458458 let totalsDiff = claimResultTuple._1
459459 let outAmount = claimResultTuple._2
460460 let outAssetId = claimResultTuple._3
461461 let origInvestArray = claimResultTuple._4
462462 let newClaimPeriodHeight = claimResultTuple._5
463463 let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement]
464464 let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement]
465465 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
466466 let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals
467467 let entries = if ((claimedAssetId58 == priceAssetId58))
468468 then {
469469 let $t02205422498 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
470470 let periodMinAvailableToClaim = $t02205422498._1
471471 let periodTotalAvailableToClaim = $t02205422498._2
472472 let periodUserAvailableToClaim = $t02205422498._3
473473 let totalUserAvailableToClaim = $t02205422498._4
474474 let usdtPriceAssetAllowableRatio = $t02205422498._5
475475 let currentUsdtPriceAssetRatio = $t02205422498._6
476476 let endPeriodBlocksLeft = $t02205422498._7
477477 let updatedCurrentPeriod = $t02205422498._8
478478 let periodStart = $t02205422498._9
479479 let periodEnd = $t02205422498._10
480480 let checks = [if ((periodUserAvailableToClaim > 0))
481481 then true
482482 else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0))
483483 then true
484484 else throwErr("unavailable to claim because total period allowance reached"), if ((periodMinAvailableToClaim > 0))
485485 then true
486486 else throwErr("nothing to claim"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio))
487487 then true
488488 else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")]
489489 if ((checks == checks))
490490 then {
491491 let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim)
492492 let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim)
493493 let entries = if ((priceAssetBalance > periodMinAvailableToClaim))
494494 then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))]
495495 else {
496496 let evaluateResult = split(asString(invoke(this, "claimREADONLY", [priceAssetId58, userAddress58], nil)), SEP)
497497 if ((evaluateResult == evaluateResult))
498498 then {
499499 let availablePriceAmountToClaim = parseIntValue(evaluateResult[3])
500500 let lastClaimEntries = if ((availablePriceAmountToClaim == periodMinAvailableToClaim))
501501 then {
502502 let investorTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount])
503503 let investorRemainingAmount = parseIntValue(origInvestArray[IdxInvRemainingAmount])
504504 let investorPriceAssetBalance = parseIntValue(origInvestArray[IdxInvClaimedPriceAssetAmount])
505505 let investorIdoAssetBalance = parseIntValue(origInvestArray[IdxInvClaimedIdoAssetAmount])
506506 let investorLastClaimedHeight = parseIntValue(origInvestArray[IdxInvLastClaimedHeight])
507507 let newInvestArray = [toString(investorTotalAmount), "0", toString(investorPriceAssetBalance), toString(investorIdoAssetBalance), toString(investorLastClaimedHeight)]
508508 let totals = readTotalsArrayOrDefault()
509509 let totalsTotalAmount = parseIntValue(totals[IdxInvTotalAmount])
510510 let totalsRemainingAmount = parseIntValue(totals[IdxInvRemainingAmount])
511511 let totalsClaimedPriceAssetAmount = parseIntValue(totals[IdxInvRemainingAmount])
512512 let totalsClaimedIdoAssetAmount = parseIntValue(totals[IdxInvClaimedPriceAssetAmount])
513513 let totalsLastClaimedHeight = parseIntValue(totals[IdxInvLastClaimedHeight])
514514 let newTotalsRemainingAmount = (totalsRemainingAmount - investorRemainingAmount)
515515 let newTotalArray = [toString(totalsTotalAmount), toString(newTotalsRemainingAmount), toString(totalsClaimedPriceAssetAmount), toString(totalsClaimedIdoAssetAmount), toString(totalsLastClaimedHeight)]
516516 let newTotalRemainingAmount = (valueOrElse(getInteger(keyTotalRemainingAmount()), 0) + investorRemainingAmount)
517517 [StringEntry(keyInvestorRemainingAmount(userAddress58), toString(investorRemainingAmount)), StringEntry(keyTotalRemainingAmount(), toString(newTotalRemainingAmount)), TotalsEntry(keyInvestor(userAddress58), newInvestArray, totalsDiff, newClaimPeriodHeight, 0), TotalsEntry(keyTotals(), newTotalArray, totalsDiff, newClaimPeriodHeight, 0)]
518518 }
519519 else [TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, 0), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, 0)]
520520 let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim)
521521 ([ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)] ++ lastClaimEntries)
522522 }
523523 else throw("Strict value is not equal to itself.")
524524 }
525525 $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)
526526 }
527527 else throw("Strict value is not equal to itself.")
528528 }
529529 else {
530530 let priceAssetBalanceIdoDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN))
531531 $Tuple2([ScriptTransfer(i.caller, (outAmount + priceAssetBalanceIdoDecimals), outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), 0), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, priceAssetBalance), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, (claimedIdoAssetAmountFromDiff + priceAssetBalanceIdoDecimals), i.transactionId)], unit)
532532 }
533533 entries
534534 }
535535 }
536536
537537
538538
539539 @Callable(i)
540540 func cleanRemaingAmount (userAddress58) = {
541541 let priceAssetId58 = readConfigArray()[IdxCfgPriceAssetId]
542542 let evaluateResult = split(asString(invoke(this, "claimREADONLY", [priceAssetId58, userAddress58], nil)), SEP)
543543 if ((evaluateResult == evaluateResult))
544544 then {
545545 let availablePriceAmountToClaim = parseIntValue(evaluateResult[2])
546546 let checkUnclaimedAssets = if ((availablePriceAmountToClaim == 0))
547547 then true
548548 else throwErr("user have unclaimed assets")
549549 if ((checkUnclaimedAssets == checkUnclaimedAssets))
550550 then {
551551 let investor = split(value(getString(keyInvestor(userAddress58))), SEP)
552552 let investorTotalAmount = parseIntValue(investor[IdxInvTotalAmount])
553553 let investorRemainingAmount = parseIntValue(investor[IdxInvRemainingAmount])
554554 let investorPriceAssetBalance = parseIntValue(investor[IdxInvClaimedPriceAssetAmount])
555555 let investorIdoAssetBalance = parseIntValue(investor[IdxInvClaimedIdoAssetAmount])
556556 let investorLastClaimedHeight = parseIntValue(investor[IdxInvLastClaimedHeight])
557557 let investorRemainingAmountCheck = if ((investorRemainingAmount != 0))
558558 then true
559559 else throwErr("investorRemainingAmount already zero")
560560 if ((investorRemainingAmountCheck == investorRemainingAmountCheck))
561561 then {
562562 let newInvestor = makeString(["%d%d%d%d%d", toString(investorTotalAmount), "0", toString(investorPriceAssetBalance), toString(investorIdoAssetBalance), toString(investorLastClaimedHeight)], SEP)
563563 let totals = split(value(getString(keyTotals())), SEP)
564564 let totalsTotalAmount = parseIntValue(totals[IdxInvTotalAmount])
565565 let totalsRemainingAmount = parseIntValue(totals[IdxInvRemainingAmount])
566566 let totalsClaimedPriceAssetAmount = parseIntValue(totals[IdxInvClaimedPriceAssetAmount])
567567 let totalsClaimedIdoAssetAmount = parseIntValue(totals[IdxInvClaimedIdoAssetAmount])
568568 let totalsLastClaimedHeight = parseIntValue(totals[IdxInvLastClaimedHeight])
569569 let newTotals = makeString(["%d%d%d%d%d", toString(totalsTotalAmount), toString((totalsRemainingAmount - investorRemainingAmount)), toString(totalsClaimedPriceAssetAmount), toString(totalsClaimedIdoAssetAmount), toString(totalsLastClaimedHeight)], SEP)
570570 let newTotalRemainingAmount = (valueOrElse(getInteger(keyTotalRemainingAmount()), 0) + investorRemainingAmount)
571571 [StringEntry(keyInvestorRemainingAmount(userAddress58), toString(investorRemainingAmount)), StringEntry(keyTotalRemainingAmount(), toString(newTotalRemainingAmount)), StringEntry(keyInvestor(userAddress58), newInvestor), StringEntry(keyTotals(), newTotals)]
572572 }
573573 else throw("Strict value is not equal to itself.")
574574 }
575575 else throw("Strict value is not equal to itself.")
576576 }
577577 else throw("Strict value is not equal to itself.")
578578 }
579579
580580
581581
582582 @Callable(i)
583583 func claimREADONLY (claimedAssetId58,userAddress58) = {
584584 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
585585 let totalsDiff = claimResultTuple._1
586586 let outAmount = claimResultTuple._2
587587 let outAssetId = claimResultTuple._3
588588 let origInvestArray = claimResultTuple._4
589589 let newClaimPeriodHeight = claimResultTuple._5
590590 let availableToClaimArray = claimResultTuple._6
591591 let availablePriceAmountToClaim = availableToClaimArray[0]
592592 let availableIdoAmountToClaim = availableToClaimArray[1]
593593 $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP))
594594 }
595595
596596
597597
598598 @Callable(i)
599599 func claimV2READONLY (claimedAssetId58,userAddress58) = {
600600 let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String(""))
601601 let totalsDiff = claimResultTuple._1
602602 let outAmount = claimResultTuple._2
603603 let outAssetId = claimResultTuple._3
604604 let origInvestArray = claimResultTuple._4
605605 let newClaimPeriodHeight = claimResultTuple._5
606606 let availableToClaimArray = claimResultTuple._6
607607 let availablePriceAmountToClaim = availableToClaimArray[0]
608608 let availableIdoAmountToClaim = availableToClaimArray[1]
609609 let cfgArray = readConfigArray()
610610 let priceAssetId58 = cfgArray[IdxCfgPriceAssetId]
611611 let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0)
612612 let priceAssetBalanceIdoDecimals = (priceAssetBalance * 100)
613613 let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceIdoDecimals)
614614 let $t03374334155 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement])
615615 let periodMinAvailableToClaim = $t03374334155._1
616616 let periodTotalAvailableToClaim = $t03374334155._2
617617 let periodUserAvailableToClaim = $t03374334155._3
618618 let totalUserAvailableToClaim = $t03374334155._4
619619 let usdtPriceAssetAllowableRatio = $t03374334155._5
620620 let currentUsdtPriceAssetRatio = $t03374334155._6
621621 let endPeriodBlocksLeft = $t03374334155._7
622622 let updatedCurrentPeriod = $t03374334155._8
623623 let periodStart = $t03374334155._9
624624 let periodEnd = $t03374334155._10
625625 let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0)
626626 let userTotalPriceAssetClaimed = (parseIntValue(readInvestorArrayOrFail(userAddress58)[IdxInvClaimedPriceAssetAmount]) - priceAssetBalance)
627627 let resultString = if ((height > currentPeriodEndHeight))
628628 then {
629629 let periodLenght = value(getInteger(keyPeriodLength()))
630630 let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58)))
631631 let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58)))
632632 makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght), toString(userTotalPriceAssetClaimed)], SEP)
633633 }
634634 else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft), toString(userTotalPriceAssetClaimed)], SEP)
635635 $Tuple2(nil, resultString)
636636 }
637637
638638
639639
640640 @Callable(i)
641641 func setManager (pendingManagerPublicKey) = {
642642 let checkCaller = mustManager(i)
643643 if ((checkCaller == checkCaller))
644644 then {
645645 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
646646 if ((checkManagerPublicKey == checkManagerPublicKey))
647647 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
648648 else throw("Strict value is not equal to itself.")
649649 }
650650 else throw("Strict value is not equal to itself.")
651651 }
652652
653653
654654
655655 @Callable(i)
656656 func confirmManager () = {
657657 let pm = pendingManagerPublicKeyOrUnit()
658658 let hasPM = if (isDefined(pm))
659659 then true
660660 else throw("No pending manager")
661661 if ((hasPM == hasPM))
662662 then {
663663 let checkPM = if ((i.callerPublicKey == value(pm)))
664664 then true
665665 else throw("You are not pending manager")
666666 if ((checkPM == checkPM))
667667 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
668668 else throw("Strict value is not equal to itself.")
669669 }
670670 else throw("Strict value is not equal to itself.")
671671 }
672672
673673
674674 @Verifier(tx)
675675 func verify () = {
676676 let targetPublicKey = match managerPublicKeyOrUnit() {
677677 case pk: ByteVector =>
678678 pk
679679 case _: Unit =>
680680 tx.senderPublicKey
681681 case _ =>
682682 throw("Match error")
683683 }
684684 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
685685 }
686686

github/deemru/w8io/169f3d6 
126.34 ms