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