tx · Ee2jxru2Dv1HBbkLEU7kn6KKUVG1ktegyhjEcbgGUkHq 3MwkjgDrsm5k73WJU9Nbxbx4y2iy3zjQzMi: -0.01400000 Waves 2021.12.13 17:40 [1832615] smart account 3MwkjgDrsm5k73WJU9Nbxbx4y2iy3zjQzMi > SELF 0.00000000 Waves
{ "type": 13, "id": "Ee2jxru2Dv1HBbkLEU7kn6KKUVG1ktegyhjEcbgGUkHq", "fee": 1400000, "feeAssetId": null, "timestamp": 1639406475338, "version": 2, "chainId": 84, "sender": "3MwkjgDrsm5k73WJU9Nbxbx4y2iy3zjQzMi", "senderPublicKey": "FRotxVW1MhTQRDvVbMM4yvYGWzBFvHqvMsonvGeEXQUy", "proofs": [ "5REtNS9YT1EXmmSXbYhtEw5q5m6G1cReow73qysi16H6oE7pi96GtqohqMRuXFV76pG7BvToj4ZDtYbJhQohnzZu", "5ywmd1ECmhG3QQaSMdV76ETFVCeK9fci43XxcuLTJrweCacSURjEwJPVeRNzFNFiRyvwGeT69swHaN1y274uZE1L" ], "script": "base64:AAIFAAAAAAAAEx0IAhIECgIBCBIDCgEIEhQKEggBAQgBAQEBAQEBARgEAQEEGBIECgIBCBIECgIBCBIECgIBCBIFCgMBAQgSAwoBARIDCgEBEgQKAgEBEgASABoPCgJhMRIJa2V5QWN0aXZlGhUKAmEyEg9rZXlBZG1pblB1YktleTEaFQoCYTMSD2tleUFkbWluUHViS2V5MhoVCgJhNBIPa2V5QWRtaW5QdWJLZXkzGicKAmE1EiFrZXlMYXVuY2hwYWREYXRhVHJhbnNhY3Rpb25TdGF0dXMaGAoCYTYSEmtleUxhdW5jaHBhZE5leHRJZBoaCgJhNxIUa2V5TGF1bmNocGFkQWN0aXZlSWQaEwoCYTgSDWtleUluaXRDYWxsZXIaEAoCYTkSCmtleUFkZHJlc3MaEwoCYjESDWtleUluaXRIZWlnaHQaFAoCYjISDmtleVN0YXJ0SGVpZ2h0GhcKAmIzEhFrZXlGaW5hbGlzZUhlaWdodBoSCgJiN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AAAAAAAAAAABQAAAAJnNAQAAAACaDEFAAAAAnR4AwkAAAEAAAACBQAAAAJoMQIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAJ3NAUAAAACaDEDCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAAAmY4BQAAAAJhNQcFAAAAAnczBwUAAAACdjj8VyYx", "height": 1832615, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3t4G5GERYgzUXMfnuYcEKXmpfy9UkCF4JeCctU6btD7c Next: 472AGAchqVUaSHUBUBHuXF6feBdwjbsh6bGao5kS8Egc Diff:
Old | New | Differences | |
---|---|---|---|
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(i) | |
187 | - | func init (projectAddress,startHeight,duration,buyToken,commission,tokensPerTicket,pricePerToken,swopfiTicketsAmount,campaignTokensAmount,tokensPerAllocation,swopPerTicket,swopFreezeDuration,claimParams,HighCompetitionSale,highCompetitionComission,highCompetitionTicketsAmount,freezeAdditionalToken,freezeParams) = if (!(isActive)) | |
188 | - | then throw("DApp is inactive at this moment") | |
189 | - | else if ((toString(i.caller) != valueOrElse(getString(this, keyInitCaller), ""))) | |
190 | - | then throw("Only project admin can call init function") | |
191 | - | else if ((size(i.payments) != 1)) | |
192 | - | then throw("One attached payment expected") | |
193 | - | else if ((height > startHeight)) | |
194 | - | then throw("Start height must be greater than blockchain height") | |
195 | - | else if (if (freezeAdditionalToken) | |
196 | - | then (size(freezeParams) != 3) | |
197 | - | else false) | |
198 | - | then throw("Freeze params list must have 3 items") | |
199 | - | else { | |
200 | - | let launchpadId = getLaunchpadNextId() | |
201 | - | let launchpadIdStr = toString(launchpadId) | |
202 | - | let $t063546429 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
203 | - | let pmtAmount = $t063546429._1 | |
204 | - | let pmtAssetId = $t063546429._2 | |
205 | - | let $t064386511 = getAssetInfo(pmtAssetId) | |
206 | - | let pmtStrAssetId = $t064386511._1 | |
207 | - | let pmtAssetName = $t064386511._2 | |
208 | - | let pmtDecimals = $t064386511._3 | |
209 | - | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
210 | - | then [BooleanEntry((launchpadIdStr + keyFreezeAdditionalToken), true), StringEntry((launchpadIdStr + keyFreezeTokenId), freezeParams[0]), IntegerEntry((launchpadIdStr + keyFreezeTokenDuration), parseIntValue(freezeParams[1])), IntegerEntry((launchpadIdStr + keyFreezeTokenPerTicket), parseIntValue(freezeParams[2]))] | |
211 | - | else nil | |
212 | - | ([IntegerEntry((pmtStrAssetId + "_launchpad"), launchpadId), IntegerEntry(keyLaunchpadNextId, (launchpadId + 1)), StringEntry((launchpadIdStr + keyAddress), projectAddress), IntegerEntry((launchpadIdStr + keyInitHeight), height), IntegerEntry((launchpadIdStr + keyStartHeight), startHeight), IntegerEntry((launchpadIdStr + keyDuration), duration), StringEntry((launchpadIdStr + keyBuyToken), buyToken), IntegerEntry((launchpadIdStr + keyFreezSwopDuration), swopFreezeDuration), IntegerEntry((launchpadIdStr + keyTotalTokenAmount), pmtAmount), StringEntry((launchpadIdStr + keyAssetId), pmtStrAssetId), IntegerEntry((launchpadIdStr + keyComission), commission), IntegerEntry((launchpadIdStr + keyTicketLastNumber), 0), IntegerEntry((launchpadIdStr + keyTokensPerTicket), tokensPerTicket), IntegerEntry((launchpadIdStr + keyPricePerToken), pricePerToken), IntegerEntry((launchpadIdStr + keySwopPerTicket), swopPerTicket), IntegerEntry((launchpadIdStr + keySwopfiTicketsAmount), swopfiTicketsAmount), IntegerEntry((launchpadIdStr + keyCampaignTokensAmount), campaignTokensAmount), IntegerEntry((launchpadIdStr + keyTokensPerAllocation), tokensPerAllocation), StringEntry((launchpadIdStr + keyClaimParams), makeString(claimParams, ",")), BooleanEntry((launchpadIdStr + keyHighCompetitionSale), HighCompetitionSale), IntegerEntry((launchpadIdStr + keyHighCompetitionComission), highCompetitionComission), IntegerEntry((launchpadIdStr + keyHighCompetitionAmount), highCompetitionTicketsAmount), IntegerEntry(keyLaunchpadActiveId, launchpadId), StringEntry(keyInitCaller, "")] ++ freezeAdditionalEntry) | |
213 | - | } | |
187 | + | func init (projectAddress,startHeight,duration,buyToken,commission,tokensPerTicket,pricePerToken,swopfiTicketsAmount,campaignTokensAmount,tokensPerAllocation,swopPerTicket,swopFreezeDuration,claimParams,HighCompetitionSale,highCompetitionComission,highCompetitionTicketsAmount,freezeAdditionalToken,freezeParams) = { | |
188 | + | let adminInitkey = valueOrElse(getString(this, keyInitCaller), "") | |
189 | + | if (!(isActive)) | |
190 | + | then throw("DApp is inactive at this moment") | |
191 | + | else if ((toString(i.caller) != adminInitkey)) | |
192 | + | then throw("Only project admin can call init function") | |
193 | + | else if ((size(i.payments) != 1)) | |
194 | + | then throw("One attached payment expected") | |
195 | + | else if ((height > startHeight)) | |
196 | + | then throw("Start height must be greater than blockchain height") | |
197 | + | else if (if (freezeAdditionalToken) | |
198 | + | then (size(freezeParams) != 3) | |
199 | + | else false) | |
200 | + | then throw("Freeze params list must have 3 items") | |
201 | + | else { | |
202 | + | let launchpadId = getLaunchpadNextId() | |
203 | + | let launchpadIdStr = toString(launchpadId) | |
204 | + | let $t063906465 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
205 | + | let pmtAmount = $t063906465._1 | |
206 | + | let pmtAssetId = $t063906465._2 | |
207 | + | let $t064746547 = getAssetInfo(pmtAssetId) | |
208 | + | let pmtStrAssetId = $t064746547._1 | |
209 | + | let pmtAssetName = $t064746547._2 | |
210 | + | let pmtDecimals = $t064746547._3 | |
211 | + | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
212 | + | then [BooleanEntry((launchpadIdStr + keyFreezeAdditionalToken), true), StringEntry((launchpadIdStr + keyFreezeTokenId), freezeParams[0]), IntegerEntry((launchpadIdStr + keyFreezeTokenDuration), parseIntValue(freezeParams[1])), IntegerEntry((launchpadIdStr + keyFreezeTokenPerTicket), parseIntValue(freezeParams[2]))] | |
213 | + | else nil | |
214 | + | ([IntegerEntry((pmtStrAssetId + "_launchpad"), launchpadId), IntegerEntry(keyLaunchpadNextId, (launchpadId + 1)), StringEntry((launchpadIdStr + keyAddress), projectAddress), IntegerEntry((launchpadIdStr + keyInitHeight), height), IntegerEntry((launchpadIdStr + keyStartHeight), startHeight), IntegerEntry((launchpadIdStr + keyDuration), duration), StringEntry((launchpadIdStr + keyBuyToken), buyToken), IntegerEntry((launchpadIdStr + keyFreezSwopDuration), swopFreezeDuration), IntegerEntry((launchpadIdStr + keyTotalTokenAmount), pmtAmount), StringEntry((launchpadIdStr + keyAssetId), pmtStrAssetId), IntegerEntry((launchpadIdStr + keyComission), commission), IntegerEntry((launchpadIdStr + keyTicketLastNumber), 0), IntegerEntry((launchpadIdStr + keyTokensPerTicket), tokensPerTicket), IntegerEntry((launchpadIdStr + keyPricePerToken), pricePerToken), IntegerEntry((launchpadIdStr + keySwopPerTicket), swopPerTicket), IntegerEntry((launchpadIdStr + keySwopfiTicketsAmount), swopfiTicketsAmount), IntegerEntry((launchpadIdStr + keyCampaignTokensAmount), campaignTokensAmount), IntegerEntry((launchpadIdStr + keyTokensPerAllocation), tokensPerAllocation), StringEntry((launchpadIdStr + keyClaimParams), makeString(claimParams, ",")), BooleanEntry((launchpadIdStr + keyHighCompetitionSale), HighCompetitionSale), IntegerEntry((launchpadIdStr + keyHighCompetitionComission), highCompetitionComission), IntegerEntry((launchpadIdStr + keyHighCompetitionAmount), highCompetitionTicketsAmount), IntegerEntry(keyLaunchpadActiveId, launchpadId), StringEntry(keyInitCaller, "")] ++ freezeAdditionalEntry) | |
215 | + | } | |
216 | + | } | |
214 | 217 | ||
215 | 218 | ||
216 | 219 | ||
217 | 220 | @Callable(i) | |
218 | 221 | func commitSwopfiSale (launchpadId,refId) = { | |
219 | - | let $ | |
220 | - | let pmtAmount = $ | |
221 | - | let pmtAssetId = $ | |
222 | - | let $ | |
223 | - | let buyAssetId = $ | |
224 | - | let buyAssetStrId = $ | |
225 | - | let buyAssetName = $ | |
226 | - | let buyAssetDecimals = $ | |
222 | + | let $t090609135 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
223 | + | let pmtAmount = $t090609135._1 | |
224 | + | let pmtAssetId = $t090609135._2 | |
225 | + | let $t091409290 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
226 | + | let buyAssetId = $t091409290._1 | |
227 | + | let buyAssetStrId = $t091409290._2 | |
228 | + | let buyAssetName = $t091409290._3 | |
229 | + | let buyAssetDecimals = $t091409290._4 | |
227 | 230 | let stakedSwops = valueOrElse(getInteger(governance, (toString(i.caller) + keyGovernanceStaked)), 0) | |
228 | 231 | let allowedTicketsAmountAll = (stakedSwops / getIntegerValue(this, (toString(launchpadId) + keySwopPerTicket))) | |
229 | 232 | let boughtTicketsAmount = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtTicketsAmount)), 0) | |
261 | 264 | else { | |
262 | 265 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
263 | 266 | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
264 | - | let $ | |
265 | - | let tokenId = $ | |
266 | - | let tokenStrAssetId = $ | |
267 | - | let tokenAssetName = $ | |
268 | - | let tokenDecimals = $ | |
267 | + | let $t01117811322 = getAssetInfoFromString(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
268 | + | let tokenId = $t01117811322._1 | |
269 | + | let tokenStrAssetId = $t01117811322._2 | |
270 | + | let tokenAssetName = $t01117811322._3 | |
271 | + | let tokenDecimals = $t01117811322._4 | |
269 | 272 | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
270 | 273 | let commissionPerTicket = fraction(ticketPrice, getIntegerValue(this, (toString(launchpadId) + keyComission)), 100) | |
271 | 274 | let buyTicketAmount = (pmtAmount / (ticketPrice + commissionPerTicket)) | |
281 | 284 | then { | |
282 | 285 | let freezeTokenId = getStringValue(this, (toString(launchpadId) + keyFreezeTokenId)) | |
283 | 286 | let freezeTokenPerTicket = getIntegerValue(this, (toString(launchpadId) + keyFreezeTokenPerTicket)) | |
284 | - | let $ | |
285 | - | let pmtAmountFreeze = $ | |
286 | - | let pmtAssetIdFreeze = $ | |
287 | - | let $ | |
288 | - | let pmtFreezeStrAssetId = $ | |
289 | - | let pmtFreezeAssetName = $ | |
290 | - | let pmtFreezeDecimals = $ | |
287 | + | let $t01248612573 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
288 | + | let pmtAmountFreeze = $t01248612573._1 | |
289 | + | let pmtAssetIdFreeze = $t01248612573._2 | |
290 | + | let $t01259012681 = getAssetInfo(pmtAssetId) | |
291 | + | let pmtFreezeStrAssetId = $t01259012681._1 | |
292 | + | let pmtFreezeAssetName = $t01259012681._2 | |
293 | + | let pmtFreezeDecimals = $t01259012681._3 | |
291 | 294 | let needFreezeTokens = (freezeTokenPerTicket * buyTicketAmount) | |
292 | 295 | if (if ((pmtFreezeStrAssetId != freezeTokenId)) | |
293 | 296 | then true | |
321 | 324 | ||
322 | 325 | @Callable(i) | |
323 | 326 | func commitAccessListSale (launchpadId,refId) = { | |
324 | - | let $ | |
325 | - | let pmtAmount = $ | |
326 | - | let pmtAssetId = $ | |
327 | - | let $ | |
328 | - | let buyAssetId = $ | |
329 | - | let buyAssetStrId = $ | |
330 | - | let buyAssetName = $ | |
331 | - | let buyAssetDecimals = $ | |
327 | + | let $t01472814803 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
328 | + | let pmtAmount = $t01472814803._1 | |
329 | + | let pmtAssetId = $t01472814803._2 | |
330 | + | let $t01480814958 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
331 | + | let buyAssetId = $t01480814958._1 | |
332 | + | let buyAssetStrId = $t01480814958._2 | |
333 | + | let buyAssetName = $t01480814958._3 | |
334 | + | let buyAssetDecimals = $t01480814958._4 | |
332 | 335 | let userUsdnInMarketing = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAmountBuyAssetInMarketing)), 0) | |
333 | 336 | let usdnInMarketing = valueOrElse(getInteger(this, (toString(launchpadId) + keyAmountBuyAssetInMarketing)), 0) | |
334 | 337 | let boughtAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtAllocations)), 0) | |
335 | 338 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
336 | 339 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
337 | 340 | let tokensPerAllocation = getIntegerValue(this, (toString(launchpadId) + keyTokensPerAllocation)) | |
338 | - | let $ | |
339 | - | let tokenId = $ | |
340 | - | let tokenStrAssetId = $ | |
341 | - | let tokenAssetName = $ | |
342 | - | let tokenDecimals = $ | |
341 | + | let $t01562715771 = getAssetInfoFromString(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
342 | + | let tokenId = $t01562715771._1 | |
343 | + | let tokenStrAssetId = $t01562715771._2 | |
344 | + | let tokenAssetName = $t01562715771._3 | |
345 | + | let tokenDecimals = $t01562715771._4 | |
343 | 346 | let allocationPriceWithComission = fraction(fraction(tokenPrice, tokensPerAllocation, pow(10, 0, tokenDecimals, 0, 0, DOWN)), (100 + commission), 100) | |
344 | 347 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
345 | 348 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
381 | 384 | ||
382 | 385 | @Callable(i) | |
383 | 386 | func commitHighCompetitionSale (launchpadId,refId) = { | |
384 | - | let $ | |
385 | - | let pmtAmount = $ | |
386 | - | let pmtAssetId = $ | |
387 | - | let $ | |
388 | - | let buyAssetId = $ | |
389 | - | let buyAssetStrId = $ | |
390 | - | let buyAssetName = $ | |
391 | - | let buyAssetDecimals = $ | |
387 | + | let $t01808018155 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
388 | + | let pmtAmount = $t01808018155._1 | |
389 | + | let pmtAssetId = $t01808018155._2 | |
390 | + | let $t01816018310 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
391 | + | let buyAssetId = $t01816018310._1 | |
392 | + | let buyAssetStrId = $t01816018310._2 | |
393 | + | let buyAssetName = $t01816018310._3 | |
394 | + | let buyAssetDecimals = $t01816018310._4 | |
392 | 395 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
393 | 396 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
394 | 397 | let boughtHCTicketsAmount = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserHCBoughtTicketsAmount)), 0) | |
410 | 413 | else { | |
411 | 414 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
412 | 415 | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
413 | - | let $ | |
414 | - | let tokenId = $ | |
415 | - | let tokenStrAssetId = $ | |
416 | - | let tokenAssetName = $ | |
417 | - | let tokenDecimals = $ | |
416 | + | let $t01955919703 = getAssetInfoFromString(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
417 | + | let tokenId = $t01955919703._1 | |
418 | + | let tokenStrAssetId = $t01955919703._2 | |
419 | + | let tokenAssetName = $t01955919703._3 | |
420 | + | let tokenDecimals = $t01955919703._4 | |
418 | 421 | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
419 | 422 | let commissionPerTicket = fraction(ticketPrice, getIntegerValue(this, (toString(launchpadId) + keyHighCompetitionComission)), 100) | |
420 | 423 | let buyTicketAmount = (pmtAmount / (ticketPrice + commissionPerTicket)) | |
459 | 462 | else if ((calcHash != savedHash)) | |
460 | 463 | then throw("vrf Height hash not matching") | |
461 | 464 | else { | |
462 | - | let $ | |
463 | - | let buyAssetId = $ | |
464 | - | let buyAssetStrId = $ | |
465 | - | let buyAssetName = $ | |
466 | - | let buyAssetDecimals = $ | |
465 | + | let $t02248822638 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
466 | + | let buyAssetId = $t02248822638._1 | |
467 | + | let buyAssetStrId = $t02248822638._2 | |
468 | + | let buyAssetName = $t02248822638._3 | |
469 | + | let buyAssetDecimals = $t02248822638._4 | |
467 | 470 | let projectAddress = addressFromStringValue(getStringValue(this, (toString(launchpadId) + keyAddress))) | |
468 | 471 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
469 | 472 | let commissionHC = getIntegerValue(this, (toString(launchpadId) + keyHighCompetitionComission)) | |
506 | 509 | else false) | |
507 | 510 | then throw("You can't claim because you don't buy anything") | |
508 | 511 | else { | |
509 | - | let $ | |
510 | - | let buyAssetId = $ | |
511 | - | let buyAssetStrId = $ | |
512 | - | let buyAssetName = $ | |
513 | - | let buyAssetDecimals = $ | |
512 | + | let $t02549725647 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
513 | + | let buyAssetId = $t02549725647._1 | |
514 | + | let buyAssetStrId = $t02549725647._2 | |
515 | + | let buyAssetName = $t02549725647._3 | |
516 | + | let buyAssetDecimals = $t02549725647._4 | |
514 | 517 | let wonnedTickets = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserWinnedTicketsAmount)), 0) | |
515 | 518 | let awailableAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAvailableAllocations)), 0) | |
516 | 519 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
517 | 520 | let allowedAllocations = min([boughtAllocations, awailableAllocations]) | |
518 | 521 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
519 | 522 | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
520 | - | let $ | |
521 | - | let tokenId = $ | |
522 | - | let tokenStrAssetId = $ | |
523 | - | let tokenAssetName = $ | |
524 | - | let tokenDecimals = $ | |
523 | + | let $t02629426438 = getAssetInfoFromString(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
524 | + | let tokenId = $t02629426438._1 | |
525 | + | let tokenStrAssetId = $t02629426438._2 | |
526 | + | let tokenAssetName = $t02629426438._3 | |
527 | + | let tokenDecimals = $t02629426438._4 | |
525 | 528 | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
526 | 529 | let tokensPerAllocation = getIntegerValue(this, (toString(launchpadId) + keyTokensPerAllocation)) | |
527 | 530 | let transferTokensAmount = ((wonnedTickets * tokensPerTicket) + (allowedAllocations * tokensPerAllocation)) | |
587 | 590 | then throw("Only admin can call this function") | |
588 | 591 | else { | |
589 | 592 | let projectAddress = addressFromStringValue(getStringValue(this, (toString(launchpadId) + keyAddress))) | |
590 | - | let $ | |
591 | - | let buyAssetId = $ | |
592 | - | let buyAssetStrId = $ | |
593 | - | let buyAssetName = $ | |
594 | - | let buyAssetDecimals = $ | |
593 | + | let $t03011030260 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
594 | + | let buyAssetId = $t03011030260._1 | |
595 | + | let buyAssetStrId = $t03011030260._2 | |
596 | + | let buyAssetName = $t03011030260._3 | |
597 | + | let buyAssetDecimals = $t03011030260._4 | |
595 | 598 | [IntegerEntry((toString(launchpadId) + keyTransferBuyAsset), amount), ScriptTransfer(projectAddress, amount, buyAssetId)] | |
596 | 599 | } | |
597 | 600 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let keyActive = "active" | |
5 | 5 | ||
6 | 6 | let keyAdminPubKey1 = "admin_pub_1" | |
7 | 7 | ||
8 | 8 | let keyAdminPubKey2 = "admin_pub_2" | |
9 | 9 | ||
10 | 10 | let keyAdminPubKey3 = "admin_pub_3" | |
11 | 11 | ||
12 | 12 | let keyLaunchpadDataTransactionStatus = "launchpad_data_transaction_status" | |
13 | 13 | ||
14 | 14 | let keyLaunchpadNextId = "launchpad_next_id" | |
15 | 15 | ||
16 | 16 | let keyLaunchpadActiveId = "launchpad_active_id" | |
17 | 17 | ||
18 | 18 | let keyInitCaller = "init_caller" | |
19 | 19 | ||
20 | 20 | let keyAddress = "_address" | |
21 | 21 | ||
22 | 22 | let keyInitHeight = "_init_height" | |
23 | 23 | ||
24 | 24 | let keyStartHeight = "_start_height" | |
25 | 25 | ||
26 | 26 | let keyFinaliseHeight = "_finalise_height" | |
27 | 27 | ||
28 | 28 | let keyComission = "_comission" | |
29 | 29 | ||
30 | 30 | let keyAssetId = "_asset_id" | |
31 | 31 | ||
32 | 32 | let keyTotalTokenAmount = "_total_token_amount" | |
33 | 33 | ||
34 | 34 | let keyTotalAmountBuyAssetSold = "_total_buy_asset_sold" | |
35 | 35 | ||
36 | 36 | let keyTokensPerTicket = "_tokens_per_ticket" | |
37 | 37 | ||
38 | 38 | let keyPricePerToken = "_price_per_token" | |
39 | 39 | ||
40 | 40 | let keySwopPerTicket = "_swop_per_ticket" | |
41 | 41 | ||
42 | 42 | let keySwopfiTicketsAmount = "_tickets_swopfi_members" | |
43 | 43 | ||
44 | 44 | let keyCampaignTokensAmount = "_tokens_access_list" | |
45 | 45 | ||
46 | 46 | let keyTokensPerAllocation = "_tokens_per_allocation" | |
47 | 47 | ||
48 | 48 | let keyTicketLastNumber = "_ticket_last_number_high_competition" | |
49 | 49 | ||
50 | 50 | let keyGovernanceStaked = "_SWOP_amount" | |
51 | 51 | ||
52 | 52 | let keyUserRefId = "_ref_id" | |
53 | 53 | ||
54 | 54 | let keyVerifyHash = "_verify_hash" | |
55 | 55 | ||
56 | 56 | let keyDuration = "_duration" | |
57 | 57 | ||
58 | 58 | let keyAmountBuyAssetInMarketing = "_total_purchased_buy_asset_in_marketing" | |
59 | 59 | ||
60 | 60 | let keyAmountBuyAssetInMarketingFinalized = "_total_purchased_buy_asset_in_marketing_finalized" | |
61 | 61 | ||
62 | 62 | let keyTransferBuyAsset = "_transfer_buy_asset" | |
63 | 63 | ||
64 | 64 | let keyFreezSwopDuration = "_freeze_swop_duration" | |
65 | 65 | ||
66 | 66 | let keyFreezeAdditionalToken = "_freeze_additional_token" | |
67 | 67 | ||
68 | 68 | let keyFreezeTokenId = "_freeze_token_id" | |
69 | 69 | ||
70 | 70 | let keyFreezeTokenDuration = "_freeze_token_duration" | |
71 | 71 | ||
72 | 72 | let keyFreezeTokenPerTicket = "_freeze_token_per_ticket" | |
73 | 73 | ||
74 | 74 | let keyBuyToken = "_buy_token" | |
75 | 75 | ||
76 | 76 | let keyClaimParams = "_claim_params" | |
77 | 77 | ||
78 | 78 | let keyHighCompetitionComission = "_high_competition_comission" | |
79 | 79 | ||
80 | 80 | let keyHighCompetitionSale = "_high_competition_sale" | |
81 | 81 | ||
82 | 82 | let keyHCTicketLastNumber = "_ticket_last_number" | |
83 | 83 | ||
84 | 84 | let keyHighCompetitionAmount = "_tickets_high_competition" | |
85 | 85 | ||
86 | 86 | let keyTotalAmountBuyAssetSoldHC = "_total_buy_asset_sold_high_competition" | |
87 | 87 | ||
88 | 88 | let keyUserBoughtTicketsAmount = "_bought_tickets" | |
89 | 89 | ||
90 | 90 | let keyUserTickets = "_tickets_number" | |
91 | 91 | ||
92 | 92 | let keyUserHCTickets = "_tickets_number_high_competition" | |
93 | 93 | ||
94 | 94 | let keyUserHCBoughtTicketsAmount = "_bought_tickets_high_competition" | |
95 | 95 | ||
96 | 96 | let keyUserAvailableAllocations = "_available_purchase_marketing" | |
97 | 97 | ||
98 | 98 | let keyUserAmountBuyAssetInMarketing = "_purchased_buy_asset_in_marketing" | |
99 | 99 | ||
100 | 100 | let keyUserBoughtAllocations = "_bought_allocations" | |
101 | 101 | ||
102 | 102 | let keyUserClaimStatus = "_claim_status" | |
103 | 103 | ||
104 | 104 | let keyUserWinnedTicketsAmount = "_tickets_result" | |
105 | 105 | ||
106 | 106 | let keyUserFreezeToken = "_freeze_token_amount" | |
107 | 107 | ||
108 | 108 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
109 | 109 | ||
110 | 110 | let governance = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU') | |
111 | 111 | ||
112 | 112 | let commissionWallet = Address(base58'3N2hBdeDEs7wCNA9EY8qv3B6drjgKD64xQG') | |
113 | 113 | ||
114 | 114 | let stakingUSDNAddress = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
115 | 115 | ||
116 | 116 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
117 | 117 | ||
118 | 118 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
119 | 119 | ||
120 | 120 | let maxAllocationsAmount = 2 | |
121 | 121 | ||
122 | 122 | let isActive = valueOrElse(getBoolean(this, keyActive), true) | |
123 | 123 | ||
124 | 124 | let activeLaunchpadId = valueOrElse(getIntegerValue(this, keyLaunchpadActiveId), -1) | |
125 | 125 | ||
126 | 126 | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
127 | 127 | case string: String => | |
128 | 128 | fromBase58String(string) | |
129 | 129 | case nothing => | |
130 | 130 | throw("Admin public key is empty") | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | let adminPubKey1 = getAdminPub(keyAdminPubKey1) | |
135 | 135 | ||
136 | 136 | let adminPubKey2 = getAdminPub(keyAdminPubKey2) | |
137 | 137 | ||
138 | 138 | let adminPubKey3 = getAdminPub(keyAdminPubKey3) | |
139 | 139 | ||
140 | 140 | func getAssetInfo (assetId) = match assetId { | |
141 | 141 | case id: ByteVector => | |
142 | 142 | let stringId = toBase58String(id) | |
143 | 143 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
144 | 144 | $Tuple3(stringId, info.name, info.decimals) | |
145 | 145 | case waves: Unit => | |
146 | 146 | $Tuple3("WAVES", "WAVES", 8) | |
147 | 147 | case _ => | |
148 | 148 | throw("Match error") | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func getLaunchpadNextId () = valueOrElse(getInteger(this, keyLaunchpadNextId), 1) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func stakedUsdnAmount () = valueOrElse(getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(USDN)) + "_") + toString(this))), 0) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES")) | |
159 | 159 | then $Tuple4(unit, "WAVES", "WAVES", 8) | |
160 | 160 | else { | |
161 | 161 | let stringId = assetStr | |
162 | 162 | let id = fromBase58String(assetStr) | |
163 | 163 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
164 | 164 | $Tuple4(id, stringId, info.name, info.decimals) | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | @Callable(i) | |
169 | 169 | func hashingRandom (launchpadId,hash) = if (!(isActive)) | |
170 | 170 | then throw("DApp is inactive at this moment") | |
171 | 171 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
172 | 172 | then throw("Only admin can call this function") | |
173 | 173 | else [StringEntry((toString(launchpadId) + keyVerifyHash), hash)] | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | 177 | @Callable(i) | |
178 | 178 | func initCaller (address) = if (!(isActive)) | |
179 | 179 | then throw("DApp is inactive at this moment") | |
180 | 180 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
181 | 181 | then throw("Only admin can call this function") | |
182 | 182 | else [StringEntry(keyInitCaller, address)] | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(i) | |
187 | - | func init (projectAddress,startHeight,duration,buyToken,commission,tokensPerTicket,pricePerToken,swopfiTicketsAmount,campaignTokensAmount,tokensPerAllocation,swopPerTicket,swopFreezeDuration,claimParams,HighCompetitionSale,highCompetitionComission,highCompetitionTicketsAmount,freezeAdditionalToken,freezeParams) = if (!(isActive)) | |
188 | - | then throw("DApp is inactive at this moment") | |
189 | - | else if ((toString(i.caller) != valueOrElse(getString(this, keyInitCaller), ""))) | |
190 | - | then throw("Only project admin can call init function") | |
191 | - | else if ((size(i.payments) != 1)) | |
192 | - | then throw("One attached payment expected") | |
193 | - | else if ((height > startHeight)) | |
194 | - | then throw("Start height must be greater than blockchain height") | |
195 | - | else if (if (freezeAdditionalToken) | |
196 | - | then (size(freezeParams) != 3) | |
197 | - | else false) | |
198 | - | then throw("Freeze params list must have 3 items") | |
199 | - | else { | |
200 | - | let launchpadId = getLaunchpadNextId() | |
201 | - | let launchpadIdStr = toString(launchpadId) | |
202 | - | let $t063546429 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
203 | - | let pmtAmount = $t063546429._1 | |
204 | - | let pmtAssetId = $t063546429._2 | |
205 | - | let $t064386511 = getAssetInfo(pmtAssetId) | |
206 | - | let pmtStrAssetId = $t064386511._1 | |
207 | - | let pmtAssetName = $t064386511._2 | |
208 | - | let pmtDecimals = $t064386511._3 | |
209 | - | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
210 | - | then [BooleanEntry((launchpadIdStr + keyFreezeAdditionalToken), true), StringEntry((launchpadIdStr + keyFreezeTokenId), freezeParams[0]), IntegerEntry((launchpadIdStr + keyFreezeTokenDuration), parseIntValue(freezeParams[1])), IntegerEntry((launchpadIdStr + keyFreezeTokenPerTicket), parseIntValue(freezeParams[2]))] | |
211 | - | else nil | |
212 | - | ([IntegerEntry((pmtStrAssetId + "_launchpad"), launchpadId), IntegerEntry(keyLaunchpadNextId, (launchpadId + 1)), StringEntry((launchpadIdStr + keyAddress), projectAddress), IntegerEntry((launchpadIdStr + keyInitHeight), height), IntegerEntry((launchpadIdStr + keyStartHeight), startHeight), IntegerEntry((launchpadIdStr + keyDuration), duration), StringEntry((launchpadIdStr + keyBuyToken), buyToken), IntegerEntry((launchpadIdStr + keyFreezSwopDuration), swopFreezeDuration), IntegerEntry((launchpadIdStr + keyTotalTokenAmount), pmtAmount), StringEntry((launchpadIdStr + keyAssetId), pmtStrAssetId), IntegerEntry((launchpadIdStr + keyComission), commission), IntegerEntry((launchpadIdStr + keyTicketLastNumber), 0), IntegerEntry((launchpadIdStr + keyTokensPerTicket), tokensPerTicket), IntegerEntry((launchpadIdStr + keyPricePerToken), pricePerToken), IntegerEntry((launchpadIdStr + keySwopPerTicket), swopPerTicket), IntegerEntry((launchpadIdStr + keySwopfiTicketsAmount), swopfiTicketsAmount), IntegerEntry((launchpadIdStr + keyCampaignTokensAmount), campaignTokensAmount), IntegerEntry((launchpadIdStr + keyTokensPerAllocation), tokensPerAllocation), StringEntry((launchpadIdStr + keyClaimParams), makeString(claimParams, ",")), BooleanEntry((launchpadIdStr + keyHighCompetitionSale), HighCompetitionSale), IntegerEntry((launchpadIdStr + keyHighCompetitionComission), highCompetitionComission), IntegerEntry((launchpadIdStr + keyHighCompetitionAmount), highCompetitionTicketsAmount), IntegerEntry(keyLaunchpadActiveId, launchpadId), StringEntry(keyInitCaller, "")] ++ freezeAdditionalEntry) | |
213 | - | } | |
187 | + | func init (projectAddress,startHeight,duration,buyToken,commission,tokensPerTicket,pricePerToken,swopfiTicketsAmount,campaignTokensAmount,tokensPerAllocation,swopPerTicket,swopFreezeDuration,claimParams,HighCompetitionSale,highCompetitionComission,highCompetitionTicketsAmount,freezeAdditionalToken,freezeParams) = { | |
188 | + | let adminInitkey = valueOrElse(getString(this, keyInitCaller), "") | |
189 | + | if (!(isActive)) | |
190 | + | then throw("DApp is inactive at this moment") | |
191 | + | else if ((toString(i.caller) != adminInitkey)) | |
192 | + | then throw("Only project admin can call init function") | |
193 | + | else if ((size(i.payments) != 1)) | |
194 | + | then throw("One attached payment expected") | |
195 | + | else if ((height > startHeight)) | |
196 | + | then throw("Start height must be greater than blockchain height") | |
197 | + | else if (if (freezeAdditionalToken) | |
198 | + | then (size(freezeParams) != 3) | |
199 | + | else false) | |
200 | + | then throw("Freeze params list must have 3 items") | |
201 | + | else { | |
202 | + | let launchpadId = getLaunchpadNextId() | |
203 | + | let launchpadIdStr = toString(launchpadId) | |
204 | + | let $t063906465 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
205 | + | let pmtAmount = $t063906465._1 | |
206 | + | let pmtAssetId = $t063906465._2 | |
207 | + | let $t064746547 = getAssetInfo(pmtAssetId) | |
208 | + | let pmtStrAssetId = $t064746547._1 | |
209 | + | let pmtAssetName = $t064746547._2 | |
210 | + | let pmtDecimals = $t064746547._3 | |
211 | + | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
212 | + | then [BooleanEntry((launchpadIdStr + keyFreezeAdditionalToken), true), StringEntry((launchpadIdStr + keyFreezeTokenId), freezeParams[0]), IntegerEntry((launchpadIdStr + keyFreezeTokenDuration), parseIntValue(freezeParams[1])), IntegerEntry((launchpadIdStr + keyFreezeTokenPerTicket), parseIntValue(freezeParams[2]))] | |
213 | + | else nil | |
214 | + | ([IntegerEntry((pmtStrAssetId + "_launchpad"), launchpadId), IntegerEntry(keyLaunchpadNextId, (launchpadId + 1)), StringEntry((launchpadIdStr + keyAddress), projectAddress), IntegerEntry((launchpadIdStr + keyInitHeight), height), IntegerEntry((launchpadIdStr + keyStartHeight), startHeight), IntegerEntry((launchpadIdStr + keyDuration), duration), StringEntry((launchpadIdStr + keyBuyToken), buyToken), IntegerEntry((launchpadIdStr + keyFreezSwopDuration), swopFreezeDuration), IntegerEntry((launchpadIdStr + keyTotalTokenAmount), pmtAmount), StringEntry((launchpadIdStr + keyAssetId), pmtStrAssetId), IntegerEntry((launchpadIdStr + keyComission), commission), IntegerEntry((launchpadIdStr + keyTicketLastNumber), 0), IntegerEntry((launchpadIdStr + keyTokensPerTicket), tokensPerTicket), IntegerEntry((launchpadIdStr + keyPricePerToken), pricePerToken), IntegerEntry((launchpadIdStr + keySwopPerTicket), swopPerTicket), IntegerEntry((launchpadIdStr + keySwopfiTicketsAmount), swopfiTicketsAmount), IntegerEntry((launchpadIdStr + keyCampaignTokensAmount), campaignTokensAmount), IntegerEntry((launchpadIdStr + keyTokensPerAllocation), tokensPerAllocation), StringEntry((launchpadIdStr + keyClaimParams), makeString(claimParams, ",")), BooleanEntry((launchpadIdStr + keyHighCompetitionSale), HighCompetitionSale), IntegerEntry((launchpadIdStr + keyHighCompetitionComission), highCompetitionComission), IntegerEntry((launchpadIdStr + keyHighCompetitionAmount), highCompetitionTicketsAmount), IntegerEntry(keyLaunchpadActiveId, launchpadId), StringEntry(keyInitCaller, "")] ++ freezeAdditionalEntry) | |
215 | + | } | |
216 | + | } | |
214 | 217 | ||
215 | 218 | ||
216 | 219 | ||
217 | 220 | @Callable(i) | |
218 | 221 | func commitSwopfiSale (launchpadId,refId) = { | |
219 | - | let $ | |
220 | - | let pmtAmount = $ | |
221 | - | let pmtAssetId = $ | |
222 | - | let $ | |
223 | - | let buyAssetId = $ | |
224 | - | let buyAssetStrId = $ | |
225 | - | let buyAssetName = $ | |
226 | - | let buyAssetDecimals = $ | |
222 | + | let $t090609135 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
223 | + | let pmtAmount = $t090609135._1 | |
224 | + | let pmtAssetId = $t090609135._2 | |
225 | + | let $t091409290 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
226 | + | let buyAssetId = $t091409290._1 | |
227 | + | let buyAssetStrId = $t091409290._2 | |
228 | + | let buyAssetName = $t091409290._3 | |
229 | + | let buyAssetDecimals = $t091409290._4 | |
227 | 230 | let stakedSwops = valueOrElse(getInteger(governance, (toString(i.caller) + keyGovernanceStaked)), 0) | |
228 | 231 | let allowedTicketsAmountAll = (stakedSwops / getIntegerValue(this, (toString(launchpadId) + keySwopPerTicket))) | |
229 | 232 | let boughtTicketsAmount = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtTicketsAmount)), 0) | |
230 | 233 | let allowedTicketsAmount = (allowedTicketsAmountAll - boughtTicketsAmount) | |
231 | 234 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
232 | 235 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
233 | 236 | let freezeAdditionalToken = valueOrElse(getBoolean(this, (toString(launchpadId) + keyFreezeAdditionalToken)), false) | |
234 | 237 | if (!(isActive)) | |
235 | 238 | then throw("DApp is inactive at this moment") | |
236 | 239 | else if ((activeLaunchpadId != launchpadId)) | |
237 | 240 | then throw("There is no active launchpad or this launchpad is ended") | |
238 | 241 | else if ((startHeight > height)) | |
239 | 242 | then throw("Launchpad sale not started yet") | |
240 | 243 | else if ((height > (startHeight + duration))) | |
241 | 244 | then throw("Launchpad sale ended") | |
242 | 245 | else if (if (!(freezeAdditionalToken)) | |
243 | 246 | then if ((size(i.payments) != 1)) | |
244 | 247 | then true | |
245 | 248 | else (pmtAssetId != buyAssetId) | |
246 | 249 | else false) | |
247 | 250 | then throw((("One attached payment in " + buyAssetName) + " expected")) | |
248 | 251 | else if (if (freezeAdditionalToken) | |
249 | 252 | then if ((size(i.payments) != 2)) | |
250 | 253 | then true | |
251 | 254 | else (pmtAssetId != buyAssetId) | |
252 | 255 | else false) | |
253 | 256 | then { | |
254 | 257 | let freezeTokenId = getStringValue(this, (toString(launchpadId) + keyFreezeTokenId)) | |
255 | 258 | throw(((("Two attached payments expected: First in " + buyAssetName) + ", second in ") + freezeTokenId)) | |
256 | 259 | } | |
257 | 260 | else if (if ((0 >= allowedTicketsAmountAll)) | |
258 | 261 | then true | |
259 | 262 | else (0 >= allowedTicketsAmount)) | |
260 | 263 | then throw("Not enought SWOP in staking to buy tickets") | |
261 | 264 | else { | |
262 | 265 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
263 | 266 | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
264 | - | let $ | |
265 | - | let tokenId = $ | |
266 | - | let tokenStrAssetId = $ | |
267 | - | let tokenAssetName = $ | |
268 | - | let tokenDecimals = $ | |
267 | + | let $t01117811322 = getAssetInfoFromString(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
268 | + | let tokenId = $t01117811322._1 | |
269 | + | let tokenStrAssetId = $t01117811322._2 | |
270 | + | let tokenAssetName = $t01117811322._3 | |
271 | + | let tokenDecimals = $t01117811322._4 | |
269 | 272 | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
270 | 273 | let commissionPerTicket = fraction(ticketPrice, getIntegerValue(this, (toString(launchpadId) + keyComission)), 100) | |
271 | 274 | let buyTicketAmount = (pmtAmount / (ticketPrice + commissionPerTicket)) | |
272 | 275 | let allowedBuyTicketAmount = min([buyTicketAmount, allowedTicketsAmount]) | |
273 | 276 | let allowedBuyPriceWithComission = (allowedBuyTicketAmount * (ticketPrice + commissionPerTicket)) | |
274 | 277 | let change = (pmtAmount - allowedBuyPriceWithComission) | |
275 | 278 | if ((buyTicketAmount == 0)) | |
276 | 279 | then throw((("Not enought " + buyAssetName) + " to buy tickets")) | |
277 | 280 | else if ((change != 0)) | |
278 | 281 | then throw((((("Wrong payment. To buy " + toString(allowedBuyTicketAmount)) + "tickets you need to pay ") + toString(allowedBuyPriceWithComission)) + buyAssetName)) | |
279 | 282 | else { | |
280 | 283 | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
281 | 284 | then { | |
282 | 285 | let freezeTokenId = getStringValue(this, (toString(launchpadId) + keyFreezeTokenId)) | |
283 | 286 | let freezeTokenPerTicket = getIntegerValue(this, (toString(launchpadId) + keyFreezeTokenPerTicket)) | |
284 | - | let $ | |
285 | - | let pmtAmountFreeze = $ | |
286 | - | let pmtAssetIdFreeze = $ | |
287 | - | let $ | |
288 | - | let pmtFreezeStrAssetId = $ | |
289 | - | let pmtFreezeAssetName = $ | |
290 | - | let pmtFreezeDecimals = $ | |
287 | + | let $t01248612573 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
288 | + | let pmtAmountFreeze = $t01248612573._1 | |
289 | + | let pmtAssetIdFreeze = $t01248612573._2 | |
290 | + | let $t01259012681 = getAssetInfo(pmtAssetId) | |
291 | + | let pmtFreezeStrAssetId = $t01259012681._1 | |
292 | + | let pmtFreezeAssetName = $t01259012681._2 | |
293 | + | let pmtFreezeDecimals = $t01259012681._3 | |
291 | 294 | let needFreezeTokens = (freezeTokenPerTicket * buyTicketAmount) | |
292 | 295 | if (if ((pmtFreezeStrAssetId != freezeTokenId)) | |
293 | 296 | then true | |
294 | 297 | else (needFreezeTokens != pmtAmountFreeze)) | |
295 | 298 | then throw((((("You need to add " + toString(needFreezeTokens)) + " ") + pmtFreezeAssetName) + " as a second payment")) | |
296 | 299 | else [IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken), pmtAmountFreeze)] | |
297 | 300 | } | |
298 | 301 | else nil | |
299 | 302 | let userBoughtTicketsNumbers = valueOrElse(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserTickets)), "") | |
300 | 303 | let lastBoughtTicketNumber = getIntegerValue(this, (toString(launchpadId) + keyTicketLastNumber)) | |
301 | 304 | let boughtRange = ((toString((lastBoughtTicketNumber + 1)) + "-") + toString((lastBoughtTicketNumber + allowedBuyTicketAmount))) | |
302 | 305 | let newUserBoughtTicketsNumbers = (userBoughtTicketsNumbers + (if ((userBoughtTicketsNumbers != "")) | |
303 | 306 | then ("," + boughtRange) | |
304 | 307 | else ("" + boughtRange))) | |
305 | 308 | let inv = if ((buyAssetId == USDN)) | |
306 | 309 | then invoke(stakingUSDNAddress, "lockNeutrino", nil, [AttachedPayment(pmtAssetId, pmtAmount)]) | |
307 | 310 | else 0 | |
308 | 311 | if ((inv == inv)) | |
309 | 312 | then { | |
310 | 313 | let baseEntry = ([IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtTicketsAmount), (boughtTicketsAmount + allowedBuyTicketAmount)), IntegerEntry((toString(launchpadId) + keyTicketLastNumber), (lastBoughtTicketNumber + allowedBuyTicketAmount)), StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserTickets), newUserBoughtTicketsNumbers)] ++ freezeAdditionalEntry) | |
311 | 314 | if (!(isDefined(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId))))) | |
312 | 315 | then (baseEntry ++ [StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId), refId)]) | |
313 | 316 | else baseEntry | |
314 | 317 | } | |
315 | 318 | else throw("Strict value is not equal to itself.") | |
316 | 319 | } | |
317 | 320 | } | |
318 | 321 | } | |
319 | 322 | ||
320 | 323 | ||
321 | 324 | ||
322 | 325 | @Callable(i) | |
323 | 326 | func commitAccessListSale (launchpadId,refId) = { | |
324 | - | let $ | |
325 | - | let pmtAmount = $ | |
326 | - | let pmtAssetId = $ | |
327 | - | let $ | |
328 | - | let buyAssetId = $ | |
329 | - | let buyAssetStrId = $ | |
330 | - | let buyAssetName = $ | |
331 | - | let buyAssetDecimals = $ | |
327 | + | let $t01472814803 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
328 | + | let pmtAmount = $t01472814803._1 | |
329 | + | let pmtAssetId = $t01472814803._2 | |
330 | + | let $t01480814958 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
331 | + | let buyAssetId = $t01480814958._1 | |
332 | + | let buyAssetStrId = $t01480814958._2 | |
333 | + | let buyAssetName = $t01480814958._3 | |
334 | + | let buyAssetDecimals = $t01480814958._4 | |
332 | 335 | let userUsdnInMarketing = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAmountBuyAssetInMarketing)), 0) | |
333 | 336 | let usdnInMarketing = valueOrElse(getInteger(this, (toString(launchpadId) + keyAmountBuyAssetInMarketing)), 0) | |
334 | 337 | let boughtAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtAllocations)), 0) | |
335 | 338 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
336 | 339 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
337 | 340 | let tokensPerAllocation = getIntegerValue(this, (toString(launchpadId) + keyTokensPerAllocation)) | |
338 | - | let $ | |
339 | - | let tokenId = $ | |
340 | - | let tokenStrAssetId = $ | |
341 | - | let tokenAssetName = $ | |
342 | - | let tokenDecimals = $ | |
341 | + | let $t01562715771 = getAssetInfoFromString(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
342 | + | let tokenId = $t01562715771._1 | |
343 | + | let tokenStrAssetId = $t01562715771._2 | |
344 | + | let tokenAssetName = $t01562715771._3 | |
345 | + | let tokenDecimals = $t01562715771._4 | |
343 | 346 | let allocationPriceWithComission = fraction(fraction(tokenPrice, tokensPerAllocation, pow(10, 0, tokenDecimals, 0, 0, DOWN)), (100 + commission), 100) | |
344 | 347 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
345 | 348 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
346 | 349 | if (!(isActive)) | |
347 | 350 | then throw("DApp is inactive at this moment") | |
348 | 351 | else if ((activeLaunchpadId != launchpadId)) | |
349 | 352 | then throw("There is no active launchpad or this launchpad is ended") | |
350 | 353 | else if ((startHeight > height)) | |
351 | 354 | then throw("Launchpad sale not started yet") | |
352 | 355 | else if ((height > (startHeight + duration))) | |
353 | 356 | then throw("Launchpad sale ended") | |
354 | 357 | else if (if ((size(i.payments) != 1)) | |
355 | 358 | then true | |
356 | 359 | else (pmtAssetId != buyAssetId)) | |
357 | 360 | then throw((("One attached payment in " + buyAssetName) + " expected")) | |
358 | 361 | else if ((boughtAllocations >= maxAllocationsAmount)) | |
359 | 362 | then throw((("You can buy only " + toString(maxAllocationsAmount)) + "allocations")) | |
360 | 363 | else if (if ((allocationPriceWithComission != pmtAmount)) | |
361 | 364 | then ((allocationPriceWithComission * 2) != pmtAmount) | |
362 | 365 | else false) | |
363 | 366 | then throw(((("Wrong payment. You can buy 1 or 2 allocations for " + toString(allocationPriceWithComission)) + buyAssetName) + " per allocation")) | |
364 | 367 | else { | |
365 | 368 | let buyAllocationsAmount = (pmtAmount / allocationPriceWithComission) | |
366 | 369 | let inv = if ((buyAssetId == USDN)) | |
367 | 370 | then invoke(stakingUSDNAddress, "lockNeutrino", nil, [AttachedPayment(pmtAssetId, pmtAmount)]) | |
368 | 371 | else 0 | |
369 | 372 | if ((inv == inv)) | |
370 | 373 | then { | |
371 | 374 | let baseEntry = [IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtAllocations), (boughtAllocations + buyAllocationsAmount)), IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAmountBuyAssetInMarketing), (userUsdnInMarketing + pmtAmount)), IntegerEntry((toString(launchpadId) + keyAmountBuyAssetInMarketing), (usdnInMarketing + pmtAmount))] | |
372 | 375 | if (!(isDefined(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId))))) | |
373 | 376 | then (baseEntry ++ [StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId), refId)]) | |
374 | 377 | else baseEntry | |
375 | 378 | } | |
376 | 379 | else throw("Strict value is not equal to itself.") | |
377 | 380 | } | |
378 | 381 | } | |
379 | 382 | ||
380 | 383 | ||
381 | 384 | ||
382 | 385 | @Callable(i) | |
383 | 386 | func commitHighCompetitionSale (launchpadId,refId) = { | |
384 | - | let $ | |
385 | - | let pmtAmount = $ | |
386 | - | let pmtAssetId = $ | |
387 | - | let $ | |
388 | - | let buyAssetId = $ | |
389 | - | let buyAssetStrId = $ | |
390 | - | let buyAssetName = $ | |
391 | - | let buyAssetDecimals = $ | |
387 | + | let $t01808018155 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
388 | + | let pmtAmount = $t01808018155._1 | |
389 | + | let pmtAssetId = $t01808018155._2 | |
390 | + | let $t01816018310 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
391 | + | let buyAssetId = $t01816018310._1 | |
392 | + | let buyAssetStrId = $t01816018310._2 | |
393 | + | let buyAssetName = $t01816018310._3 | |
394 | + | let buyAssetDecimals = $t01816018310._4 | |
392 | 395 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
393 | 396 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
394 | 397 | let boughtHCTicketsAmount = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserHCBoughtTicketsAmount)), 0) | |
395 | 398 | let highCompetitionSale = valueOrElse(getBoolean(this, (toString(launchpadId) + keyHighCompetitionSale)), false) | |
396 | 399 | if (!(isActive)) | |
397 | 400 | then throw("DApp is inactive at this moment") | |
398 | 401 | else if ((activeLaunchpadId != launchpadId)) | |
399 | 402 | then throw("There is no active launchpad or this launchpad is ended") | |
400 | 403 | else if (!(highCompetitionSale)) | |
401 | 404 | then throw("There is no high competition sale for this launchpad") | |
402 | 405 | else if ((startHeight > height)) | |
403 | 406 | then throw("Launchpad sale not started yet") | |
404 | 407 | else if ((height > (startHeight + duration))) | |
405 | 408 | then throw("Launchpad sale ended") | |
406 | 409 | else if (if ((size(i.payments) != 1)) | |
407 | 410 | then true | |
408 | 411 | else (pmtAssetId != buyAssetId)) | |
409 | 412 | then throw((("One attached payment in " + buyAssetName) + " expected")) | |
410 | 413 | else { | |
411 | 414 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
412 | 415 | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
413 | - | let $ | |
414 | - | let tokenId = $ | |
415 | - | let tokenStrAssetId = $ | |
416 | - | let tokenAssetName = $ | |
417 | - | let tokenDecimals = $ | |
416 | + | let $t01955919703 = getAssetInfoFromString(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
417 | + | let tokenId = $t01955919703._1 | |
418 | + | let tokenStrAssetId = $t01955919703._2 | |
419 | + | let tokenAssetName = $t01955919703._3 | |
420 | + | let tokenDecimals = $t01955919703._4 | |
418 | 421 | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
419 | 422 | let commissionPerTicket = fraction(ticketPrice, getIntegerValue(this, (toString(launchpadId) + keyHighCompetitionComission)), 100) | |
420 | 423 | let buyTicketAmount = (pmtAmount / (ticketPrice + commissionPerTicket)) | |
421 | 424 | let buyPriceWithComission = (buyTicketAmount * (ticketPrice + commissionPerTicket)) | |
422 | 425 | let change = (pmtAmount - buyPriceWithComission) | |
423 | 426 | if ((buyTicketAmount == 0)) | |
424 | 427 | then throw((("Not enought " + buyAssetName) + " to buy tickets")) | |
425 | 428 | else if ((change != 0)) | |
426 | 429 | then throw((((("Wrong payment. To buy " + toString(buyTicketAmount)) + "tickets you need to pay ") + toString(buyPriceWithComission)) + buyAssetName)) | |
427 | 430 | else { | |
428 | 431 | let userBoughtTicketsNumbers = valueOrElse(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserHCTickets)), "") | |
429 | 432 | let lastBoughtTicketNumber = getIntegerValue(this, (toString(launchpadId) + keyHCTicketLastNumber)) | |
430 | 433 | let boughtRange = ((toString((lastBoughtTicketNumber + 1)) + "-") + toString((lastBoughtTicketNumber + buyTicketAmount))) | |
431 | 434 | let newUserBoughtTicketsNumbers = (userBoughtTicketsNumbers + (if ((userBoughtTicketsNumbers != "")) | |
432 | 435 | then ("," + boughtRange) | |
433 | 436 | else ("" + boughtRange))) | |
434 | 437 | let inv = if ((buyAssetId == USDN)) | |
435 | 438 | then invoke(stakingUSDNAddress, "lockNeutrino", nil, [AttachedPayment(pmtAssetId, pmtAmount)]) | |
436 | 439 | else 0 | |
437 | 440 | if ((inv == inv)) | |
438 | 441 | then { | |
439 | 442 | let baseEntry = [IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserHCBoughtTicketsAmount), (boughtHCTicketsAmount + buyTicketAmount)), IntegerEntry((toString(launchpadId) + keyHCTicketLastNumber), (lastBoughtTicketNumber + buyTicketAmount)), StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserHCTickets), newUserBoughtTicketsNumbers)] | |
440 | 443 | if (!(isDefined(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId))))) | |
441 | 444 | then (baseEntry ++ [StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId), refId)]) | |
442 | 445 | else baseEntry | |
443 | 446 | } | |
444 | 447 | else throw("Strict value is not equal to itself.") | |
445 | 448 | } | |
446 | 449 | } | |
447 | 450 | } | |
448 | 451 | ||
449 | 452 | ||
450 | 453 | ||
451 | 454 | @Callable(i) | |
452 | 455 | func finalise (launchpadId,vrfHeight,secretWord) = { | |
453 | 456 | let savedHash = getStringValue(this, (toString(launchpadId) + keyVerifyHash)) | |
454 | 457 | let calcHash = toBase58String(sha256((toBytes(vrfHeight) + toBytes(secretWord)))) | |
455 | 458 | if (!(isActive)) | |
456 | 459 | then throw("DApp is inactive at this moment") | |
457 | 460 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
458 | 461 | then throw("Only admin can call this function") | |
459 | 462 | else if ((calcHash != savedHash)) | |
460 | 463 | then throw("vrf Height hash not matching") | |
461 | 464 | else { | |
462 | - | let $ | |
463 | - | let buyAssetId = $ | |
464 | - | let buyAssetStrId = $ | |
465 | - | let buyAssetName = $ | |
466 | - | let buyAssetDecimals = $ | |
465 | + | let $t02248822638 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
466 | + | let buyAssetId = $t02248822638._1 | |
467 | + | let buyAssetStrId = $t02248822638._2 | |
468 | + | let buyAssetName = $t02248822638._3 | |
469 | + | let buyAssetDecimals = $t02248822638._4 | |
467 | 470 | let projectAddress = addressFromStringValue(getStringValue(this, (toString(launchpadId) + keyAddress))) | |
468 | 471 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
469 | 472 | let commissionHC = getIntegerValue(this, (toString(launchpadId) + keyHighCompetitionComission)) | |
470 | 473 | let transferedBuyAsset = valueOrElse(getInteger(this, (toString(launchpadId) + keyTransferBuyAsset)), 0) | |
471 | 474 | let swopfiMembersBuyAssetAmount = getIntegerValue(this, (toString(launchpadId) + keyTotalAmountBuyAssetSold)) | |
472 | 475 | let swopfiHCBuyAssetAmount = valueOrElse(getIntegerValue(this, (toString(launchpadId) + keyTotalAmountBuyAssetSoldHC)), 0) | |
473 | 476 | let swopfiMembersComission = fraction(swopfiMembersBuyAssetAmount, commission, 100) | |
474 | 477 | let swopfiHCComission = fraction(swopfiHCBuyAssetAmount, commissionHC, 100) | |
475 | 478 | let totalAmountBuyAssetInMarketing = getIntegerValue(this, (toString(launchpadId) + keyAmountBuyAssetInMarketingFinalized)) | |
476 | 479 | let marketingComission = fraction(totalAmountBuyAssetInMarketing, commission, 100) | |
477 | 480 | let unstakeAmount = (((((swopfiMembersBuyAssetAmount + totalAmountBuyAssetInMarketing) + swopfiMembersComission) + marketingComission) + swopfiHCBuyAssetAmount) + swopfiHCComission) | |
478 | 481 | if ((transferedBuyAsset > (swopfiMembersBuyAssetAmount + totalAmountBuyAssetInMarketing))) | |
479 | 482 | then throw("Can't transfer negative value to project") | |
480 | 483 | else { | |
481 | 484 | let inv = if ((buyAssetId == USDN)) | |
482 | 485 | then invoke(stakingUSDNAddress, "unlockNeutrino", [unstakeAmount, toBase58String(USDN)], nil) | |
483 | 486 | else 0 | |
484 | 487 | if ((inv == inv)) | |
485 | 488 | then [IntegerEntry((toString(launchpadId) + keyFinaliseHeight), height), ScriptTransfer(projectAddress, ((swopfiMembersBuyAssetAmount + totalAmountBuyAssetInMarketing) - transferedBuyAsset), buyAssetId), ScriptTransfer(commissionWallet, ((swopfiMembersComission + marketingComission) + swopfiHCComission), buyAssetId)] | |
486 | 489 | else throw("Strict value is not equal to itself.") | |
487 | 490 | } | |
488 | 491 | } | |
489 | 492 | } | |
490 | 493 | ||
491 | 494 | ||
492 | 495 | ||
493 | 496 | @Callable(i) | |
494 | 497 | func claim (launchpadId) = { | |
495 | 498 | let userClaimStatus = valueOrElse(getBoolean(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserClaimStatus)), false) | |
496 | 499 | let boughtTickets = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtTicketsAmount)), 0) | |
497 | 500 | let boughtAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtAllocations)), 0) | |
498 | 501 | if (!(isActive)) | |
499 | 502 | then throw("DApp is inactive at this moment") | |
500 | 503 | else if (!(isDefined(getInteger(this, (toString(launchpadId) + keyFinaliseHeight))))) | |
501 | 504 | then throw("You can't claim because results are not finalized") | |
502 | 505 | else if (userClaimStatus) | |
503 | 506 | then throw("You are already claimed") | |
504 | 507 | else if (if ((boughtTickets == 0)) | |
505 | 508 | then (boughtAllocations == 0) | |
506 | 509 | else false) | |
507 | 510 | then throw("You can't claim because you don't buy anything") | |
508 | 511 | else { | |
509 | - | let $ | |
510 | - | let buyAssetId = $ | |
511 | - | let buyAssetStrId = $ | |
512 | - | let buyAssetName = $ | |
513 | - | let buyAssetDecimals = $ | |
512 | + | let $t02549725647 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
513 | + | let buyAssetId = $t02549725647._1 | |
514 | + | let buyAssetStrId = $t02549725647._2 | |
515 | + | let buyAssetName = $t02549725647._3 | |
516 | + | let buyAssetDecimals = $t02549725647._4 | |
514 | 517 | let wonnedTickets = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserWinnedTicketsAmount)), 0) | |
515 | 518 | let awailableAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAvailableAllocations)), 0) | |
516 | 519 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
517 | 520 | let allowedAllocations = min([boughtAllocations, awailableAllocations]) | |
518 | 521 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
519 | 522 | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
520 | - | let $ | |
521 | - | let tokenId = $ | |
522 | - | let tokenStrAssetId = $ | |
523 | - | let tokenAssetName = $ | |
524 | - | let tokenDecimals = $ | |
523 | + | let $t02629426438 = getAssetInfoFromString(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
524 | + | let tokenId = $t02629426438._1 | |
525 | + | let tokenStrAssetId = $t02629426438._2 | |
526 | + | let tokenAssetName = $t02629426438._3 | |
527 | + | let tokenDecimals = $t02629426438._4 | |
525 | 528 | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
526 | 529 | let tokensPerAllocation = getIntegerValue(this, (toString(launchpadId) + keyTokensPerAllocation)) | |
527 | 530 | let transferTokensAmount = ((wonnedTickets * tokensPerTicket) + (allowedAllocations * tokensPerAllocation)) | |
528 | 531 | let notAllowedAllocationsTokens = ((boughtAllocations - allowedAllocations) * tokensPerAllocation) | |
529 | 532 | let buyAssetForAllocations = fraction(fraction(notAllowedAllocationsTokens, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)), (100 + commission), 100) | |
530 | 533 | let buyAssetForUnwonnedTickets = fraction(((boughtTickets - wonnedTickets) * ticketPrice), (100 + commission), 100) | |
531 | 534 | if (if ((0 > buyAssetForAllocations)) | |
532 | 535 | then true | |
533 | 536 | else (0 > buyAssetForUnwonnedTickets)) | |
534 | 537 | then throw("Error with allowed allocation param or wonned tickets param please contact support") | |
535 | 538 | else { | |
536 | 539 | let returnedBuyAssetAmount = (buyAssetForUnwonnedTickets + buyAssetForUnwonnedTickets) | |
537 | 540 | let transferUsdn = if ((returnedBuyAssetAmount > 0)) | |
538 | 541 | then [ScriptTransfer(i.caller, returnedBuyAssetAmount, buyAssetId)] | |
539 | 542 | else nil | |
540 | 543 | let transferTokens = if ((transferTokensAmount > 0)) | |
541 | 544 | then [ScriptTransfer(i.caller, transferTokensAmount, tokenId)] | |
542 | 545 | else nil | |
543 | 546 | let inv = if (if ((returnedBuyAssetAmount > 0)) | |
544 | 547 | then (buyAssetId == USDN) | |
545 | 548 | else false) | |
546 | 549 | then invoke(stakingUSDNAddress, "unlockNeutrino", [returnedBuyAssetAmount, toBase58String(USDN)], nil) | |
547 | 550 | else 0 | |
548 | 551 | if ((inv == inv)) | |
549 | 552 | then (([BooleanEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserClaimStatus), true)] ++ transferTokens) ++ transferUsdn) | |
550 | 553 | else throw("Strict value is not equal to itself.") | |
551 | 554 | } | |
552 | 555 | } | |
553 | 556 | } | |
554 | 557 | ||
555 | 558 | ||
556 | 559 | ||
557 | 560 | @Callable(i) | |
558 | 561 | func claimFreezeToken (launchpadId) = { | |
559 | 562 | let freezeAdditionalToken = valueOrElse(getBoolean(this, (toString(launchpadId) + keyFreezeAdditionalToken)), false) | |
560 | 563 | if (!(isActive)) | |
561 | 564 | then throw("DApp is inactive at this moment") | |
562 | 565 | else if (!(isDefined(getInteger(this, (toString(launchpadId) + keyFinaliseHeight))))) | |
563 | 566 | then throw("You can't claim because results are not finalized") | |
564 | 567 | else if (!(freezeAdditionalToken)) | |
565 | 568 | then throw("There are no additional token freezing for this launchpad") | |
566 | 569 | else { | |
567 | 570 | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyFreezeTokenId))) | |
568 | 571 | let userTokensFreezed = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken)), 0) | |
569 | 572 | let startHeight = valueOrElse(getInteger(this, (toString(launchpadId) + keyStartHeight)), 0) | |
570 | 573 | let duration = valueOrElse(getInteger(this, (toString(launchpadId) + keyDuration)), 0) | |
571 | 574 | let freezeTokenDuration = getIntegerValue(this, (toString(launchpadId) + keyFreezeTokenDuration)) | |
572 | 575 | let blockEndHeight = ((startHeight + duration) + freezeTokenDuration) | |
573 | 576 | if ((userTokensFreezed == 0)) | |
574 | 577 | then throw("You are already claimed your tokens or not paid anything") | |
575 | 578 | else if ((blockEndHeight > height)) | |
576 | 579 | then throw(("Your tokens freezed teel " + toString(blockEndHeight))) | |
577 | 580 | else [ScriptTransfer(i.caller, userTokensFreezed, tokenId), IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken), 0)] | |
578 | 581 | } | |
579 | 582 | } | |
580 | 583 | ||
581 | 584 | ||
582 | 585 | ||
583 | 586 | @Callable(i) | |
584 | 587 | func transferBuyAsset (launchpadId,amount) = if (!(isActive)) | |
585 | 588 | then throw("DApp is inactive") | |
586 | 589 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
587 | 590 | then throw("Only admin can call this function") | |
588 | 591 | else { | |
589 | 592 | let projectAddress = addressFromStringValue(getStringValue(this, (toString(launchpadId) + keyAddress))) | |
590 | - | let $ | |
591 | - | let buyAssetId = $ | |
592 | - | let buyAssetStrId = $ | |
593 | - | let buyAssetName = $ | |
594 | - | let buyAssetDecimals = $ | |
593 | + | let $t03011030260 = getAssetInfoFromString(value(getString(this, (toString(launchpadId) + keyBuyToken)))) | |
594 | + | let buyAssetId = $t03011030260._1 | |
595 | + | let buyAssetStrId = $t03011030260._2 | |
596 | + | let buyAssetName = $t03011030260._3 | |
597 | + | let buyAssetDecimals = $t03011030260._4 | |
595 | 598 | [IntegerEntry((toString(launchpadId) + keyTransferBuyAsset), amount), ScriptTransfer(projectAddress, amount, buyAssetId)] | |
596 | 599 | } | |
597 | 600 | ||
598 | 601 | ||
599 | 602 | ||
600 | 603 | @Callable(i) | |
601 | 604 | func shutdown () = if (!(isActive)) | |
602 | 605 | then throw("DApp already inactive") | |
603 | 606 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
604 | 607 | then throw("Only admin can call this function") | |
605 | 608 | else [BooleanEntry(keyActive, false)] | |
606 | 609 | ||
607 | 610 | ||
608 | 611 | ||
609 | 612 | @Callable(i) | |
610 | 613 | func activate () = if (isActive) | |
611 | 614 | then throw("DApp already active") | |
612 | 615 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
613 | 616 | then throw("Only admin can call this function") | |
614 | 617 | else [BooleanEntry(keyActive, true)] | |
615 | 618 | ||
616 | 619 | ||
617 | 620 | @Verifier(tx) | |
618 | 621 | func verify () = { | |
619 | 622 | let multiSignedByAdmins = { | |
620 | 623 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
621 | 624 | then 1 | |
622 | 625 | else 0 | |
623 | 626 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
624 | 627 | then 1 | |
625 | 628 | else 0 | |
626 | 629 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
627 | 630 | then 1 | |
628 | 631 | else 0 | |
629 | 632 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
630 | 633 | } | |
631 | 634 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
632 | 635 | then true | |
633 | 636 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
634 | 637 | then true | |
635 | 638 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
636 | 639 | then true | |
637 | 640 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
638 | 641 | match tx { | |
639 | 642 | case dtx: DataTransaction => | |
640 | 643 | if (valueOrElse(getBoolean(oracle, keyLaunchpadDataTransactionStatus), false)) | |
641 | 644 | then signedByAdmin | |
642 | 645 | else false | |
643 | 646 | case _ => | |
644 | 647 | multiSignedByAdmins | |
645 | 648 | } | |
646 | 649 | } | |
647 | 650 |
github/deemru/w8io/026f985 115.83 ms ◑