tx · CDWcwp553L4RJpxspWNTcpGXwthNGVK4Hch9wENYEfvb 3MwkjgDrsm5k73WJU9Nbxbx4y2iy3zjQzMi: -0.01400000 Waves 2021.12.03 13:54 [1817998] smart account 3MwkjgDrsm5k73WJU9Nbxbx4y2iy3zjQzMi > SELF 0.00000000 Waves
{ "type": 13, "id": "CDWcwp553L4RJpxspWNTcpGXwthNGVK4Hch9wENYEfvb", "fee": 1400000, "feeAssetId": null, "timestamp": 1638528961645, "version": 2, "chainId": 84, "sender": "3MwkjgDrsm5k73WJU9Nbxbx4y2iy3zjQzMi", "senderPublicKey": "FRotxVW1MhTQRDvVbMM4yvYGWzBFvHqvMsonvGeEXQUy", "proofs": [ "64L1wYdHqbit2dRrGfgpnRq382jLKFoXuuXgCym18GMeCd97udwEqJHotMuL99kd5gZzJFRkBpdRApAa5QaEJEys", "2sTDdwgTiBnzmn2pDfaeKUqrQXU3rwJgr82SQCGGQ1CeGtpZ66GkdvYat11xeHwFwa5X1Hf3P2fCe1aPUBkruGuD" ], "script": "base64:AAIFAAAAAAAAAEQIAhIECgIBCBIDCgEIEg4KDAgBAQEBAQEBAQEEGBIECgIBCBIECgIBCBIFCgMBAQgSAwoBARIDCgEBEgQKAgEBEgASAAAAADwAAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAA9rZXlBZG1pblB1YktleTECAAAAC2FkbWluX3B1Yl8xAAAAAA9rZXlBZG1pblB1YktleTICAAAAC2FkbWluX3B1Yl8yAAAAAA9rZXlBZG1pblB1YktleTMCAAAAC2FkbWluX3B1Yl8zAAAAACFrZXlMYXVuY2hwYWREYXRhVHJhbnNhY3Rpb25TdGF0dXMCAAAAIWxhdW5jaHBhZF9kYXRhX3RyYW5zYWN0aW9uX3N0YXR1cwAAAAASa2V5TGF1bmNocGFkTmV4dElkAgAAABFsYXVuY2hwYWRfbmV4dF9pZAAAAAAUa2V5TGF1bmNocGFkQWN0aXZlSWQCAAAAE2xhdW5jaHBhZF9hY3RpdmVfaWQ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lib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkxBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTMGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAASYWRtaW5QdWJLZXlTdGFraW5nBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAANkdHgFAAAAByRtYXRjaDADCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAABm9yYWNsZQUAAAAha2V5TGF1bmNocGFkRGF0YVRyYW5zYWN0aW9uU3RhdHVzBwUAAAANc2lnbmVkQnlBZG1pbgcFAAAAE211bHRpU2lnbmVkQnlBZG1pbnNol9vl", "height": 1817998, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3DWedvTbm36mW5YHnShZYJrsqLZbNHYMZ2uDJp5fBE6L Next: DpBnKrkZzLRZvrHzj181W395GwdhwFtgLGMx9USQ7ETa Diff:
Old | New | Differences | |
---|---|---|---|
61 | 61 | ||
62 | 62 | let keyTransferUsd = "_transfer_usd" | |
63 | 63 | ||
64 | + | let keyFreezSwopDuration = "_freeze_swop_duration" | |
65 | + | ||
66 | + | let keyFreezeAdditionalToken = "_freeze_additional_token" | |
67 | + | ||
68 | + | let keyFreezeTokenId = "_freeze_token_id" | |
69 | + | ||
70 | + | let keyFreezeTokenDuration = "_freeze_token_duration" | |
71 | + | ||
72 | + | let keyFreezeTokenPerTicket = "_freeze_token_per_ticket" | |
73 | + | ||
64 | 74 | let keyUserBoughtTicketsAmount = "_bought_tickets" | |
65 | 75 | ||
66 | 76 | let keyUserTickets = "_tickets_number" | |
74 | 84 | let keyUserClaimStatus = "_claim_status" | |
75 | 85 | ||
76 | 86 | let keyUserWinnedTicketsAmount = "_tickets_result" | |
87 | + | ||
88 | + | let keyUserFreezeToken = "_freeze_token_amount" | |
77 | 89 | ||
78 | 90 | let lauchpadDuration = 10000 | |
79 | 91 | ||
146 | 158 | ||
147 | 159 | ||
148 | 160 | @Callable(i) | |
149 | - | func init (projectAddress,startHeight,commission,tokensPerTicket,pricePerToken,swopfiTicketsAmount,campaignTokensAmount,tokensPerAllocation,swopPerTicket) = | |
150 | - | | |
151 | - | | |
152 | - | | |
153 | - | if (! | |
154 | - | then throw(" | |
155 | - | else if (( | |
156 | - | then throw(" | |
157 | - | else if (( | |
158 | - | then | |
159 | - | else | |
160 | - | then throw(" | |
161 | + | func init (projectAddress,startHeight,commission,tokensPerTicket,pricePerToken,swopfiTicketsAmount,campaignTokensAmount,tokensPerAllocation,swopPerTicket,swopFreezeDuration,freezeAdditionalToken,freezeParams) = if (!(isActive)) | |
162 | + | then throw("DApp is inactive at this moment") | |
163 | + | else if ((toString(i.caller) != valueOrElse(getString(this, keyInitCaller), ""))) | |
164 | + | then throw("Only project admin can call init function") | |
165 | + | else if ((size(i.payments) != 1)) | |
166 | + | then throw("One attached payment expected") | |
167 | + | else if ((height > startHeight)) | |
168 | + | then throw("Start height must be greater than blockchain height") | |
169 | + | else if (if (freezeAdditionalToken) | |
170 | + | then (size(freezeParams) != 3) | |
171 | + | else false) | |
172 | + | then throw("Freeze params list must have 3 items") | |
161 | 173 | else { | |
162 | - | let $t047054778 = getAssetInfo(pmtAssetId) | |
163 | - | let pmtStrAssetId = $t047054778._1 | |
164 | - | let pmtAssetName = $t047054778._2 | |
165 | - | let pmtDecimals = $t047054778._3 | |
166 | 174 | let launchpadId = getLaunchpadNextId() | |
167 | 175 | let launchpadIdStr = toString(launchpadId) | |
168 | - | [IntegerEntry((pmtStrAssetId + "_launchpad"), launchpadId), IntegerEntry(keyLaunchpadNextId, (launchpadId + 1)), StringEntry((launchpadIdStr + keyAddress), projectAddress), IntegerEntry((launchpadIdStr + keyInitHeight), height), IntegerEntry((launchpadIdStr + keyStartHeight), startHeight), IntegerEntry((launchpadIdStr + keyDuration), lauchpadDuration), 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), IntegerEntry(keyLaunchpadActiveId, launchpadId), StringEntry(keyInitCaller, "")] | |
176 | + | let $t053095384 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
177 | + | let pmtAmount = $t053095384._1 | |
178 | + | let pmtAssetId = $t053095384._2 | |
179 | + | let $t053935466 = getAssetInfo(pmtAssetId) | |
180 | + | let pmtStrAssetId = $t053935466._1 | |
181 | + | let pmtAssetName = $t053935466._2 | |
182 | + | let pmtDecimals = $t053935466._3 | |
183 | + | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
184 | + | then [BooleanEntry((launchpadIdStr + keyFreezeAdditionalToken), true), StringEntry((launchpadIdStr + keyFreezeTokenId), freezeParams[0]), IntegerEntry((launchpadIdStr + keyFreezeTokenDuration), parseIntValue(freezeParams[1])), IntegerEntry((launchpadIdStr + keyFreezeTokenPerTicket), parseIntValue(freezeParams[2]))] | |
185 | + | 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), lauchpadDuration), 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), IntegerEntry(keyLaunchpadActiveId, launchpadId), StringEntry(keyInitCaller, "")] ++ freezeAdditionalEntry) | |
169 | 187 | } | |
170 | - | } | |
171 | 188 | ||
172 | 189 | ||
173 | 190 | ||
174 | 191 | @Callable(i) | |
175 | 192 | func commitSwopfiSale (launchpadId,refId) = { | |
176 | - | let $ | |
177 | - | let pmtAmount = $ | |
178 | - | let pmtAssetId = $ | |
193 | + | let $t075377612 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
194 | + | let pmtAmount = $t075377612._1 | |
195 | + | let pmtAssetId = $t075377612._2 | |
179 | 196 | let stakedSwops = valueOrElse(getInteger(governance, (toString(i.caller) + keyGovernanceStaked)), 0) | |
180 | 197 | let allowedTicketsAmountAll = (stakedSwops / getIntegerValue(this, (toString(launchpadId) + keySwopPerTicket))) | |
181 | 198 | let boughtTicketsAmount = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtTicketsAmount)), 0) | |
182 | 199 | let allowedTicketsAmount = (allowedTicketsAmountAll - boughtTicketsAmount) | |
183 | 200 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
184 | 201 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
202 | + | let freezeAdditionalToken = valueOrElse(getBoolean(this, (toString(launchpadId) + keyFreezeAdditionalToken)), false) | |
185 | 203 | if (!(isActive)) | |
186 | 204 | then throw("DApp is inactive at this moment") | |
187 | 205 | else if ((activeLaunchpadId != launchpadId)) | |
190 | 208 | then throw("Launchpad sale not started yet") | |
191 | 209 | else if ((height > (startHeight + duration))) | |
192 | 210 | then throw("Launchpad sale ended") | |
193 | - | else if (if ((size(i.payments) != 1)) | |
194 | - | then true | |
195 | - | else (pmtAssetId != USDN)) | |
211 | + | else if (if (!(freezeAdditionalToken)) | |
212 | + | then if ((size(i.payments) != 1)) | |
213 | + | then true | |
214 | + | else (pmtAssetId != USDN) | |
215 | + | else false) | |
196 | 216 | then throw("One attached payment in USDN expected") | |
197 | - | else if (if ((0 >= allowedTicketsAmountAll)) | |
198 | - | then true | |
199 | - | else (0 >= allowedTicketsAmount)) | |
200 | - | then throw("Not enought SWOP in staking to buy tickets") | |
201 | - | else { | |
202 | - | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
203 | - | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
204 | - | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
205 | - | let $t078717947 = getAssetInfo(tokenId) | |
206 | - | let tokenStrAssetId = $t078717947._1 | |
207 | - | let tokenAssetName = $t078717947._2 | |
208 | - | let tokenDecimals = $t078717947._3 | |
209 | - | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
210 | - | let commissionPerTicket = fraction(ticketPrice, getIntegerValue(this, (toString(launchpadId) + keyComission)), 100) | |
211 | - | let buyTicketAmount = (pmtAmount / (ticketPrice + commissionPerTicket)) | |
212 | - | let allowedBuyTicketAmount = min([buyTicketAmount, allowedTicketsAmount]) | |
213 | - | let allowedBuyPriceWithComission = (allowedBuyTicketAmount * (ticketPrice + commissionPerTicket)) | |
214 | - | let change = (pmtAmount - allowedBuyPriceWithComission) | |
215 | - | if ((buyTicketAmount == 0)) | |
216 | - | then throw("Not enought USDN to buy tickets") | |
217 | - | else if ((change != 0)) | |
218 | - | then throw((((("Wrong payment. To buy " + toString(allowedBuyTicketAmount)) + "tickets you need to pay ") + toString(allowedBuyPriceWithComission)) + "USDN")) | |
219 | - | else { | |
220 | - | let userBoughtTicketsNumbers = valueOrElse(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserTickets)), "") | |
221 | - | let lastBoughtTicketNumber = getIntegerValue(this, (toString(launchpadId) + keyTicketLastNumber)) | |
222 | - | let boughtRange = ((toString((lastBoughtTicketNumber + 1)) + "-") + toString((lastBoughtTicketNumber + allowedBuyTicketAmount))) | |
223 | - | let newUserBoughtTicketsNumbers = (userBoughtTicketsNumbers + (if ((userBoughtTicketsNumbers != "")) | |
224 | - | then ("," + boughtRange) | |
225 | - | else ("" + boughtRange))) | |
226 | - | let inv = invoke(stakingUSDNAddress, "lockNeutrino", nil, [AttachedPayment(pmtAssetId, pmtAmount)]) | |
227 | - | if ((inv == inv)) | |
228 | - | then { | |
229 | - | 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)] | |
230 | - | if (!(isDefined(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId))))) | |
231 | - | then (baseEntry ++ [StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId), refId)]) | |
232 | - | else baseEntry | |
233 | - | } | |
234 | - | else throw("Strict value is not equal to itself.") | |
235 | - | } | |
217 | + | else if (if (freezeAdditionalToken) | |
218 | + | then if ((size(i.payments) != 2)) | |
219 | + | then true | |
220 | + | else (pmtAssetId != USDN) | |
221 | + | else false) | |
222 | + | then { | |
223 | + | let freezeTokenId = getStringValue(this, (toString(launchpadId) + keyFreezeTokenId)) | |
224 | + | throw(("Two attached payments expected: First in USDN, second in " + freezeTokenId)) | |
236 | 225 | } | |
226 | + | else if (if ((0 >= allowedTicketsAmountAll)) | |
227 | + | then true | |
228 | + | else (0 >= allowedTicketsAmount)) | |
229 | + | then throw("Not enought SWOP in staking to buy tickets") | |
230 | + | else { | |
231 | + | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
232 | + | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
233 | + | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
234 | + | let $t095549630 = getAssetInfo(tokenId) | |
235 | + | let tokenStrAssetId = $t095549630._1 | |
236 | + | let tokenAssetName = $t095549630._2 | |
237 | + | let tokenDecimals = $t095549630._3 | |
238 | + | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
239 | + | let commissionPerTicket = fraction(ticketPrice, getIntegerValue(this, (toString(launchpadId) + keyComission)), 100) | |
240 | + | let buyTicketAmount = (pmtAmount / (ticketPrice + commissionPerTicket)) | |
241 | + | let allowedBuyTicketAmount = min([buyTicketAmount, allowedTicketsAmount]) | |
242 | + | let allowedBuyPriceWithComission = (allowedBuyTicketAmount * (ticketPrice + commissionPerTicket)) | |
243 | + | let change = (pmtAmount - allowedBuyPriceWithComission) | |
244 | + | if ((buyTicketAmount == 0)) | |
245 | + | then throw("Not enought USDN to buy tickets") | |
246 | + | else if ((change != 0)) | |
247 | + | then throw((((("Wrong payment. To buy " + toString(allowedBuyTicketAmount)) + "tickets you need to pay ") + toString(allowedBuyPriceWithComission)) + "USDN")) | |
248 | + | else { | |
249 | + | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
250 | + | then { | |
251 | + | let freezeTokenId = getStringValue(this, (toString(launchpadId) + keyFreezeTokenId)) | |
252 | + | let freezeTokenPerTicket = getIntegerValue(this, (toString(launchpadId) + keyFreezeTokenPerTicket)) | |
253 | + | let $t01077210859 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
254 | + | let pmtAmountFreeze = $t01077210859._1 | |
255 | + | let pmtAssetIdFreeze = $t01077210859._2 | |
256 | + | let $t01087610967 = getAssetInfo(pmtAssetId) | |
257 | + | let pmtFreezeStrAssetId = $t01087610967._1 | |
258 | + | let pmtFreezeAssetName = $t01087610967._2 | |
259 | + | let pmtFreezeDecimals = $t01087610967._3 | |
260 | + | let needFreezeTokens = (freezeTokenPerTicket * buyTicketAmount) | |
261 | + | if (if ((pmtFreezeStrAssetId != freezeTokenId)) | |
262 | + | then true | |
263 | + | else (needFreezeTokens != pmtAmountFreeze)) | |
264 | + | then throw((((("You need to add " + toString(needFreezeTokens)) + " ") + pmtFreezeAssetName) + " as a second payment")) | |
265 | + | else [IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken), pmtAmountFreeze)] | |
266 | + | } | |
267 | + | else nil | |
268 | + | let userBoughtTicketsNumbers = valueOrElse(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserTickets)), "") | |
269 | + | let lastBoughtTicketNumber = getIntegerValue(this, (toString(launchpadId) + keyTicketLastNumber)) | |
270 | + | let boughtRange = ((toString((lastBoughtTicketNumber + 1)) + "-") + toString((lastBoughtTicketNumber + allowedBuyTicketAmount))) | |
271 | + | let newUserBoughtTicketsNumbers = (userBoughtTicketsNumbers + (if ((userBoughtTicketsNumbers != "")) | |
272 | + | then ("," + boughtRange) | |
273 | + | else ("" + boughtRange))) | |
274 | + | let inv = invoke(stakingUSDNAddress, "lockNeutrino", nil, [AttachedPayment(pmtAssetId, pmtAmount)]) | |
275 | + | if ((inv == inv)) | |
276 | + | then { | |
277 | + | 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 | + | if (!(isDefined(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId))))) | |
279 | + | then (baseEntry ++ [StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId), refId)]) | |
280 | + | else baseEntry | |
281 | + | } | |
282 | + | else throw("Strict value is not equal to itself.") | |
283 | + | } | |
284 | + | } | |
237 | 285 | } | |
238 | 286 | ||
239 | 287 | ||
240 | 288 | ||
241 | 289 | @Callable(i) | |
242 | 290 | func commitAccessListSale (launchpadId,refId) = { | |
243 | - | let $ | |
244 | - | let pmtAmount = $ | |
245 | - | let pmtAssetId = $ | |
291 | + | let $t01295413029 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
292 | + | let pmtAmount = $t01295413029._1 | |
293 | + | let pmtAssetId = $t01295413029._2 | |
246 | 294 | let userUsdnInMarketing = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAmountUSDNInMarketing)), 0) | |
247 | 295 | let usdnInMarketing = valueOrElse(getInteger(this, (toString(launchpadId) + keyAmountUSDNInMarketing)), 0) | |
248 | 296 | let boughtAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtAllocations)), 0) | |
250 | 298 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
251 | 299 | let tokensPerAllocation = getIntegerValue(this, (toString(launchpadId) + keyTokensPerAllocation)) | |
252 | 300 | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
253 | - | let $ | |
254 | - | let tokenStrAssetId = $ | |
255 | - | let tokenAssetName = $ | |
256 | - | let tokenDecimals = $ | |
301 | + | let $t01378413860 = getAssetInfo(tokenId) | |
302 | + | let tokenStrAssetId = $t01378413860._1 | |
303 | + | let tokenAssetName = $t01378413860._2 | |
304 | + | let tokenDecimals = $t01378413860._3 | |
257 | 305 | let allocationPriceWithComission = fraction(fraction(tokenPrice, tokensPerAllocation, pow(10, 0, tokenDecimals, 0, 0, DOWN)), (100 + commission), 100) | |
258 | 306 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
259 | 307 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
346 | 394 | let allowedAllocations = min([boughtAllocations, awailableAllocations]) | |
347 | 395 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
348 | 396 | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
349 | - | let $ | |
350 | - | let tokenStrAssetId = $ | |
351 | - | let tokenAssetName = $ | |
352 | - | let tokenDecimals = $ | |
397 | + | let $t01963419710 = getAssetInfo(tokenId) | |
398 | + | let tokenStrAssetId = $t01963419710._1 | |
399 | + | let tokenAssetName = $t01963419710._2 | |
400 | + | let tokenDecimals = $t01963419710._3 | |
353 | 401 | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
354 | 402 | let tokensPerAllocation = getIntegerValue(this, (toString(launchpadId) + keyTokensPerAllocation)) | |
355 | 403 | let transferTokensAmount = ((wonnedTickets * tokensPerTicket) + (allowedAllocations * tokensPerAllocation)) | |
376 | 424 | else throw("Strict value is not equal to itself.") | |
377 | 425 | } | |
378 | 426 | } | |
427 | + | } | |
428 | + | ||
429 | + | ||
430 | + | ||
431 | + | @Callable(i) | |
432 | + | func claimFreezeToken (launchpadId) = { | |
433 | + | let freezeAdditionalToken = valueOrElse(getBoolean(this, (toString(launchpadId) + keyFreezeAdditionalToken)), false) | |
434 | + | if (!(isActive)) | |
435 | + | then throw("DApp is inactive at this moment") | |
436 | + | else if (!(isDefined(getInteger(this, (toString(launchpadId) + keyFinaliseHeight))))) | |
437 | + | then throw("You can't claim because results are not finalized") | |
438 | + | else if (!(freezeAdditionalToken)) | |
439 | + | then throw("There are no additional token freezing for this launchpad") | |
440 | + | else { | |
441 | + | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyFreezeTokenId))) | |
442 | + | let userTokensFreezed = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken)), 0) | |
443 | + | let startHeight = valueOrElse(getInteger(this, (toString(launchpadId) + keyStartHeight)), 0) | |
444 | + | let duration = valueOrElse(getInteger(this, (toString(launchpadId) + keyDuration)), 0) | |
445 | + | let freezeTokenDuration = getIntegerValue(this, (toString(launchpadId) + keyFreezeTokenDuration)) | |
446 | + | let blockEndHeight = ((startHeight + duration) + freezeTokenDuration) | |
447 | + | if ((userTokensFreezed == 0)) | |
448 | + | then throw("You are already claimed your tokens or not paid anything") | |
449 | + | else if ((blockEndHeight > height)) | |
450 | + | then throw(("Your tokens freezed teel " + toString(blockEndHeight))) | |
451 | + | else [ScriptTransfer(i.caller, userTokensFreezed, tokenId), IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken), 0)] | |
452 | + | } | |
379 | 453 | } | |
380 | 454 | ||
381 | 455 |
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 keyTotalAmountUsdnSold = "_total_usdn_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" | |
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 keyAmountUSDNInMarketing = "_total_purchased_usdn_in_marketing" | |
59 | 59 | ||
60 | 60 | let keyAmountUSDNInMarketingFinalized = "_total_purchased_usdn_in_marketing_finalized" | |
61 | 61 | ||
62 | 62 | let keyTransferUsd = "_transfer_usd" | |
63 | 63 | ||
64 | + | let keyFreezSwopDuration = "_freeze_swop_duration" | |
65 | + | ||
66 | + | let keyFreezeAdditionalToken = "_freeze_additional_token" | |
67 | + | ||
68 | + | let keyFreezeTokenId = "_freeze_token_id" | |
69 | + | ||
70 | + | let keyFreezeTokenDuration = "_freeze_token_duration" | |
71 | + | ||
72 | + | let keyFreezeTokenPerTicket = "_freeze_token_per_ticket" | |
73 | + | ||
64 | 74 | let keyUserBoughtTicketsAmount = "_bought_tickets" | |
65 | 75 | ||
66 | 76 | let keyUserTickets = "_tickets_number" | |
67 | 77 | ||
68 | 78 | let keyUserAvailableAllocations = "_available_purchase_marketing" | |
69 | 79 | ||
70 | 80 | let keyUserAmountUSDNInMarketing = "_purchased_usdn_in_marketing" | |
71 | 81 | ||
72 | 82 | let keyUserBoughtAllocations = "_bought_allocations" | |
73 | 83 | ||
74 | 84 | let keyUserClaimStatus = "_claim_status" | |
75 | 85 | ||
76 | 86 | let keyUserWinnedTicketsAmount = "_tickets_result" | |
87 | + | ||
88 | + | let keyUserFreezeToken = "_freeze_token_amount" | |
77 | 89 | ||
78 | 90 | let lauchpadDuration = 10000 | |
79 | 91 | ||
80 | 92 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
81 | 93 | ||
82 | 94 | let governance = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU') | |
83 | 95 | ||
84 | 96 | let commissionWallet = Address(base58'3N2hBdeDEs7wCNA9EY8qv3B6drjgKD64xQG') | |
85 | 97 | ||
86 | 98 | let stakingUSDNAddress = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
87 | 99 | ||
88 | 100 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
89 | 101 | ||
90 | 102 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
91 | 103 | ||
92 | 104 | let maxAllocationsAmount = 2 | |
93 | 105 | ||
94 | 106 | let isActive = valueOrElse(getBoolean(this, keyActive), true) | |
95 | 107 | ||
96 | 108 | let activeLaunchpadId = valueOrElse(getIntegerValue(this, keyLaunchpadActiveId), -1) | |
97 | 109 | ||
98 | 110 | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
99 | 111 | case string: String => | |
100 | 112 | fromBase58String(string) | |
101 | 113 | case nothing => | |
102 | 114 | throw("Admin public key is empty") | |
103 | 115 | } | |
104 | 116 | ||
105 | 117 | ||
106 | 118 | let adminPubKey1 = getAdminPub(keyAdminPubKey1) | |
107 | 119 | ||
108 | 120 | let adminPubKey2 = getAdminPub(keyAdminPubKey2) | |
109 | 121 | ||
110 | 122 | let adminPubKey3 = getAdminPub(keyAdminPubKey3) | |
111 | 123 | ||
112 | 124 | func getAssetInfo (assetId) = match assetId { | |
113 | 125 | case id: ByteVector => | |
114 | 126 | let stringId = toBase58String(id) | |
115 | 127 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
116 | 128 | $Tuple3(stringId, info.name, info.decimals) | |
117 | 129 | case waves: Unit => | |
118 | 130 | $Tuple3("WAVES", "WAVES", 8) | |
119 | 131 | case _ => | |
120 | 132 | throw("Match error") | |
121 | 133 | } | |
122 | 134 | ||
123 | 135 | ||
124 | 136 | func getLaunchpadNextId () = valueOrElse(getInteger(this, keyLaunchpadNextId), 1) | |
125 | 137 | ||
126 | 138 | ||
127 | 139 | func stakedUsdnAmount () = valueOrElse(getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(USDN)) + "_") + toString(this))), 0) | |
128 | 140 | ||
129 | 141 | ||
130 | 142 | @Callable(i) | |
131 | 143 | func hashingRandom (launchpadId,hash) = if (!(isActive)) | |
132 | 144 | then throw("DApp is inactive at this moment") | |
133 | 145 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
134 | 146 | then throw("Only admin can call this function") | |
135 | 147 | else [StringEntry((toString(launchpadId) + keyVerifyHash), hash)] | |
136 | 148 | ||
137 | 149 | ||
138 | 150 | ||
139 | 151 | @Callable(i) | |
140 | 152 | func initCaller (address) = if (!(isActive)) | |
141 | 153 | then throw("DApp is inactive at this moment") | |
142 | 154 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
143 | 155 | then throw("Only admin can call this function") | |
144 | 156 | else [StringEntry(keyInitCaller, address)] | |
145 | 157 | ||
146 | 158 | ||
147 | 159 | ||
148 | 160 | @Callable(i) | |
149 | - | func init (projectAddress,startHeight,commission,tokensPerTicket,pricePerToken,swopfiTicketsAmount,campaignTokensAmount,tokensPerAllocation,swopPerTicket) = | |
150 | - | | |
151 | - | | |
152 | - | | |
153 | - | if (! | |
154 | - | then throw(" | |
155 | - | else if (( | |
156 | - | then throw(" | |
157 | - | else if (( | |
158 | - | then | |
159 | - | else | |
160 | - | then throw(" | |
161 | + | func init (projectAddress,startHeight,commission,tokensPerTicket,pricePerToken,swopfiTicketsAmount,campaignTokensAmount,tokensPerAllocation,swopPerTicket,swopFreezeDuration,freezeAdditionalToken,freezeParams) = if (!(isActive)) | |
162 | + | then throw("DApp is inactive at this moment") | |
163 | + | else if ((toString(i.caller) != valueOrElse(getString(this, keyInitCaller), ""))) | |
164 | + | then throw("Only project admin can call init function") | |
165 | + | else if ((size(i.payments) != 1)) | |
166 | + | then throw("One attached payment expected") | |
167 | + | else if ((height > startHeight)) | |
168 | + | then throw("Start height must be greater than blockchain height") | |
169 | + | else if (if (freezeAdditionalToken) | |
170 | + | then (size(freezeParams) != 3) | |
171 | + | else false) | |
172 | + | then throw("Freeze params list must have 3 items") | |
161 | 173 | else { | |
162 | - | let $t047054778 = getAssetInfo(pmtAssetId) | |
163 | - | let pmtStrAssetId = $t047054778._1 | |
164 | - | let pmtAssetName = $t047054778._2 | |
165 | - | let pmtDecimals = $t047054778._3 | |
166 | 174 | let launchpadId = getLaunchpadNextId() | |
167 | 175 | let launchpadIdStr = toString(launchpadId) | |
168 | - | [IntegerEntry((pmtStrAssetId + "_launchpad"), launchpadId), IntegerEntry(keyLaunchpadNextId, (launchpadId + 1)), StringEntry((launchpadIdStr + keyAddress), projectAddress), IntegerEntry((launchpadIdStr + keyInitHeight), height), IntegerEntry((launchpadIdStr + keyStartHeight), startHeight), IntegerEntry((launchpadIdStr + keyDuration), lauchpadDuration), 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), IntegerEntry(keyLaunchpadActiveId, launchpadId), StringEntry(keyInitCaller, "")] | |
176 | + | let $t053095384 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
177 | + | let pmtAmount = $t053095384._1 | |
178 | + | let pmtAssetId = $t053095384._2 | |
179 | + | let $t053935466 = getAssetInfo(pmtAssetId) | |
180 | + | let pmtStrAssetId = $t053935466._1 | |
181 | + | let pmtAssetName = $t053935466._2 | |
182 | + | let pmtDecimals = $t053935466._3 | |
183 | + | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
184 | + | then [BooleanEntry((launchpadIdStr + keyFreezeAdditionalToken), true), StringEntry((launchpadIdStr + keyFreezeTokenId), freezeParams[0]), IntegerEntry((launchpadIdStr + keyFreezeTokenDuration), parseIntValue(freezeParams[1])), IntegerEntry((launchpadIdStr + keyFreezeTokenPerTicket), parseIntValue(freezeParams[2]))] | |
185 | + | 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), lauchpadDuration), 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), IntegerEntry(keyLaunchpadActiveId, launchpadId), StringEntry(keyInitCaller, "")] ++ freezeAdditionalEntry) | |
169 | 187 | } | |
170 | - | } | |
171 | 188 | ||
172 | 189 | ||
173 | 190 | ||
174 | 191 | @Callable(i) | |
175 | 192 | func commitSwopfiSale (launchpadId,refId) = { | |
176 | - | let $ | |
177 | - | let pmtAmount = $ | |
178 | - | let pmtAssetId = $ | |
193 | + | let $t075377612 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
194 | + | let pmtAmount = $t075377612._1 | |
195 | + | let pmtAssetId = $t075377612._2 | |
179 | 196 | let stakedSwops = valueOrElse(getInteger(governance, (toString(i.caller) + keyGovernanceStaked)), 0) | |
180 | 197 | let allowedTicketsAmountAll = (stakedSwops / getIntegerValue(this, (toString(launchpadId) + keySwopPerTicket))) | |
181 | 198 | let boughtTicketsAmount = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtTicketsAmount)), 0) | |
182 | 199 | let allowedTicketsAmount = (allowedTicketsAmountAll - boughtTicketsAmount) | |
183 | 200 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
184 | 201 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
202 | + | let freezeAdditionalToken = valueOrElse(getBoolean(this, (toString(launchpadId) + keyFreezeAdditionalToken)), false) | |
185 | 203 | if (!(isActive)) | |
186 | 204 | then throw("DApp is inactive at this moment") | |
187 | 205 | else if ((activeLaunchpadId != launchpadId)) | |
188 | 206 | then throw("There is no active launchpad or this launchpad is ended") | |
189 | 207 | else if ((startHeight > height)) | |
190 | 208 | then throw("Launchpad sale not started yet") | |
191 | 209 | else if ((height > (startHeight + duration))) | |
192 | 210 | then throw("Launchpad sale ended") | |
193 | - | else if (if ((size(i.payments) != 1)) | |
194 | - | then true | |
195 | - | else (pmtAssetId != USDN)) | |
211 | + | else if (if (!(freezeAdditionalToken)) | |
212 | + | then if ((size(i.payments) != 1)) | |
213 | + | then true | |
214 | + | else (pmtAssetId != USDN) | |
215 | + | else false) | |
196 | 216 | then throw("One attached payment in USDN expected") | |
197 | - | else if (if ((0 >= allowedTicketsAmountAll)) | |
198 | - | then true | |
199 | - | else (0 >= allowedTicketsAmount)) | |
200 | - | then throw("Not enought SWOP in staking to buy tickets") | |
201 | - | else { | |
202 | - | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
203 | - | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
204 | - | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
205 | - | let $t078717947 = getAssetInfo(tokenId) | |
206 | - | let tokenStrAssetId = $t078717947._1 | |
207 | - | let tokenAssetName = $t078717947._2 | |
208 | - | let tokenDecimals = $t078717947._3 | |
209 | - | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
210 | - | let commissionPerTicket = fraction(ticketPrice, getIntegerValue(this, (toString(launchpadId) + keyComission)), 100) | |
211 | - | let buyTicketAmount = (pmtAmount / (ticketPrice + commissionPerTicket)) | |
212 | - | let allowedBuyTicketAmount = min([buyTicketAmount, allowedTicketsAmount]) | |
213 | - | let allowedBuyPriceWithComission = (allowedBuyTicketAmount * (ticketPrice + commissionPerTicket)) | |
214 | - | let change = (pmtAmount - allowedBuyPriceWithComission) | |
215 | - | if ((buyTicketAmount == 0)) | |
216 | - | then throw("Not enought USDN to buy tickets") | |
217 | - | else if ((change != 0)) | |
218 | - | then throw((((("Wrong payment. To buy " + toString(allowedBuyTicketAmount)) + "tickets you need to pay ") + toString(allowedBuyPriceWithComission)) + "USDN")) | |
219 | - | else { | |
220 | - | let userBoughtTicketsNumbers = valueOrElse(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserTickets)), "") | |
221 | - | let lastBoughtTicketNumber = getIntegerValue(this, (toString(launchpadId) + keyTicketLastNumber)) | |
222 | - | let boughtRange = ((toString((lastBoughtTicketNumber + 1)) + "-") + toString((lastBoughtTicketNumber + allowedBuyTicketAmount))) | |
223 | - | let newUserBoughtTicketsNumbers = (userBoughtTicketsNumbers + (if ((userBoughtTicketsNumbers != "")) | |
224 | - | then ("," + boughtRange) | |
225 | - | else ("" + boughtRange))) | |
226 | - | let inv = invoke(stakingUSDNAddress, "lockNeutrino", nil, [AttachedPayment(pmtAssetId, pmtAmount)]) | |
227 | - | if ((inv == inv)) | |
228 | - | then { | |
229 | - | 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)] | |
230 | - | if (!(isDefined(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId))))) | |
231 | - | then (baseEntry ++ [StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId), refId)]) | |
232 | - | else baseEntry | |
233 | - | } | |
234 | - | else throw("Strict value is not equal to itself.") | |
235 | - | } | |
217 | + | else if (if (freezeAdditionalToken) | |
218 | + | then if ((size(i.payments) != 2)) | |
219 | + | then true | |
220 | + | else (pmtAssetId != USDN) | |
221 | + | else false) | |
222 | + | then { | |
223 | + | let freezeTokenId = getStringValue(this, (toString(launchpadId) + keyFreezeTokenId)) | |
224 | + | throw(("Two attached payments expected: First in USDN, second in " + freezeTokenId)) | |
236 | 225 | } | |
226 | + | else if (if ((0 >= allowedTicketsAmountAll)) | |
227 | + | then true | |
228 | + | else (0 >= allowedTicketsAmount)) | |
229 | + | then throw("Not enought SWOP in staking to buy tickets") | |
230 | + | else { | |
231 | + | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
232 | + | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
233 | + | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
234 | + | let $t095549630 = getAssetInfo(tokenId) | |
235 | + | let tokenStrAssetId = $t095549630._1 | |
236 | + | let tokenAssetName = $t095549630._2 | |
237 | + | let tokenDecimals = $t095549630._3 | |
238 | + | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
239 | + | let commissionPerTicket = fraction(ticketPrice, getIntegerValue(this, (toString(launchpadId) + keyComission)), 100) | |
240 | + | let buyTicketAmount = (pmtAmount / (ticketPrice + commissionPerTicket)) | |
241 | + | let allowedBuyTicketAmount = min([buyTicketAmount, allowedTicketsAmount]) | |
242 | + | let allowedBuyPriceWithComission = (allowedBuyTicketAmount * (ticketPrice + commissionPerTicket)) | |
243 | + | let change = (pmtAmount - allowedBuyPriceWithComission) | |
244 | + | if ((buyTicketAmount == 0)) | |
245 | + | then throw("Not enought USDN to buy tickets") | |
246 | + | else if ((change != 0)) | |
247 | + | then throw((((("Wrong payment. To buy " + toString(allowedBuyTicketAmount)) + "tickets you need to pay ") + toString(allowedBuyPriceWithComission)) + "USDN")) | |
248 | + | else { | |
249 | + | let freezeAdditionalEntry = if (freezeAdditionalToken) | |
250 | + | then { | |
251 | + | let freezeTokenId = getStringValue(this, (toString(launchpadId) + keyFreezeTokenId)) | |
252 | + | let freezeTokenPerTicket = getIntegerValue(this, (toString(launchpadId) + keyFreezeTokenPerTicket)) | |
253 | + | let $t01077210859 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
254 | + | let pmtAmountFreeze = $t01077210859._1 | |
255 | + | let pmtAssetIdFreeze = $t01077210859._2 | |
256 | + | let $t01087610967 = getAssetInfo(pmtAssetId) | |
257 | + | let pmtFreezeStrAssetId = $t01087610967._1 | |
258 | + | let pmtFreezeAssetName = $t01087610967._2 | |
259 | + | let pmtFreezeDecimals = $t01087610967._3 | |
260 | + | let needFreezeTokens = (freezeTokenPerTicket * buyTicketAmount) | |
261 | + | if (if ((pmtFreezeStrAssetId != freezeTokenId)) | |
262 | + | then true | |
263 | + | else (needFreezeTokens != pmtAmountFreeze)) | |
264 | + | then throw((((("You need to add " + toString(needFreezeTokens)) + " ") + pmtFreezeAssetName) + " as a second payment")) | |
265 | + | else [IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken), pmtAmountFreeze)] | |
266 | + | } | |
267 | + | else nil | |
268 | + | let userBoughtTicketsNumbers = valueOrElse(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserTickets)), "") | |
269 | + | let lastBoughtTicketNumber = getIntegerValue(this, (toString(launchpadId) + keyTicketLastNumber)) | |
270 | + | let boughtRange = ((toString((lastBoughtTicketNumber + 1)) + "-") + toString((lastBoughtTicketNumber + allowedBuyTicketAmount))) | |
271 | + | let newUserBoughtTicketsNumbers = (userBoughtTicketsNumbers + (if ((userBoughtTicketsNumbers != "")) | |
272 | + | then ("," + boughtRange) | |
273 | + | else ("" + boughtRange))) | |
274 | + | let inv = invoke(stakingUSDNAddress, "lockNeutrino", nil, [AttachedPayment(pmtAssetId, pmtAmount)]) | |
275 | + | if ((inv == inv)) | |
276 | + | then { | |
277 | + | 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 | + | if (!(isDefined(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId))))) | |
279 | + | then (baseEntry ++ [StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId), refId)]) | |
280 | + | else baseEntry | |
281 | + | } | |
282 | + | else throw("Strict value is not equal to itself.") | |
283 | + | } | |
284 | + | } | |
237 | 285 | } | |
238 | 286 | ||
239 | 287 | ||
240 | 288 | ||
241 | 289 | @Callable(i) | |
242 | 290 | func commitAccessListSale (launchpadId,refId) = { | |
243 | - | let $ | |
244 | - | let pmtAmount = $ | |
245 | - | let pmtAssetId = $ | |
291 | + | let $t01295413029 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
292 | + | let pmtAmount = $t01295413029._1 | |
293 | + | let pmtAssetId = $t01295413029._2 | |
246 | 294 | let userUsdnInMarketing = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAmountUSDNInMarketing)), 0) | |
247 | 295 | let usdnInMarketing = valueOrElse(getInteger(this, (toString(launchpadId) + keyAmountUSDNInMarketing)), 0) | |
248 | 296 | let boughtAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtAllocations)), 0) | |
249 | 297 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
250 | 298 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
251 | 299 | let tokensPerAllocation = getIntegerValue(this, (toString(launchpadId) + keyTokensPerAllocation)) | |
252 | 300 | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
253 | - | let $ | |
254 | - | let tokenStrAssetId = $ | |
255 | - | let tokenAssetName = $ | |
256 | - | let tokenDecimals = $ | |
301 | + | let $t01378413860 = getAssetInfo(tokenId) | |
302 | + | let tokenStrAssetId = $t01378413860._1 | |
303 | + | let tokenAssetName = $t01378413860._2 | |
304 | + | let tokenDecimals = $t01378413860._3 | |
257 | 305 | let allocationPriceWithComission = fraction(fraction(tokenPrice, tokensPerAllocation, pow(10, 0, tokenDecimals, 0, 0, DOWN)), (100 + commission), 100) | |
258 | 306 | let startHeight = value(getInteger(this, (toString(launchpadId) + keyStartHeight))) | |
259 | 307 | let duration = value(getInteger(this, (toString(launchpadId) + keyDuration))) | |
260 | 308 | if (!(isActive)) | |
261 | 309 | then throw("DApp is inactive at this moment") | |
262 | 310 | else if ((activeLaunchpadId != launchpadId)) | |
263 | 311 | then throw("There is no active launchpad or this launchpad is ended") | |
264 | 312 | else if ((startHeight > height)) | |
265 | 313 | then throw("Launchpad sale not started yet") | |
266 | 314 | else if ((height > (startHeight + duration))) | |
267 | 315 | then throw("Launchpad sale ended") | |
268 | 316 | else if (if ((size(i.payments) != 1)) | |
269 | 317 | then true | |
270 | 318 | else (pmtAssetId != USDN)) | |
271 | 319 | then throw("One attached payment in USDN expected") | |
272 | 320 | else if ((boughtAllocations >= maxAllocationsAmount)) | |
273 | 321 | then throw((("You can buy only " + toString(maxAllocationsAmount)) + "allocations")) | |
274 | 322 | else if (if ((allocationPriceWithComission != pmtAmount)) | |
275 | 323 | then ((allocationPriceWithComission * 2) != pmtAmount) | |
276 | 324 | else false) | |
277 | 325 | then throw((("Wrong payment. You can buy 1 or 2 allocations for " + toString(allocationPriceWithComission)) + " USDN per allocation")) | |
278 | 326 | else { | |
279 | 327 | let buyAllocationsAmount = (pmtAmount / allocationPriceWithComission) | |
280 | 328 | let inv = invoke(stakingUSDNAddress, "lockNeutrino", nil, [AttachedPayment(pmtAssetId, pmtAmount)]) | |
281 | 329 | if ((inv == inv)) | |
282 | 330 | then { | |
283 | 331 | let baseEntry = [IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtAllocations), (boughtAllocations + buyAllocationsAmount)), IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAmountUSDNInMarketing), (userUsdnInMarketing + pmtAmount)), IntegerEntry((toString(launchpadId) + keyAmountUSDNInMarketing), (usdnInMarketing + pmtAmount))] | |
284 | 332 | if (!(isDefined(getString(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId))))) | |
285 | 333 | then (baseEntry ++ [StringEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserRefId), refId)]) | |
286 | 334 | else baseEntry | |
287 | 335 | } | |
288 | 336 | else throw("Strict value is not equal to itself.") | |
289 | 337 | } | |
290 | 338 | } | |
291 | 339 | ||
292 | 340 | ||
293 | 341 | ||
294 | 342 | @Callable(i) | |
295 | 343 | func finalise (launchpadId,vrfHeight,secretWord) = { | |
296 | 344 | let savedHash = getStringValue(this, (toString(launchpadId) + keyVerifyHash)) | |
297 | 345 | let calcHash = toBase58String(sha256((toBytes(vrfHeight) + toBytes(secretWord)))) | |
298 | 346 | if (!(isActive)) | |
299 | 347 | then throw("DApp is inactive at this moment") | |
300 | 348 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
301 | 349 | then throw("Only admin can call this function") | |
302 | 350 | else if ((calcHash != savedHash)) | |
303 | 351 | then throw("vrf Height hash not matching") | |
304 | 352 | else { | |
305 | 353 | let projectAddress = addressFromStringValue(getStringValue(this, (toString(launchpadId) + keyAddress))) | |
306 | 354 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
307 | 355 | let transferedUsdn = valueOrElse(getInteger(this, (toString(launchpadId) + keyTransferUsd)), 0) | |
308 | 356 | let swopfiMembersUsdnAmount = getIntegerValue(this, (toString(launchpadId) + keyTotalAmountUsdnSold)) | |
309 | 357 | let swopfiMembersComission = fraction(swopfiMembersUsdnAmount, commission, 100) | |
310 | 358 | let totalAmountUsdnInMarketing = getIntegerValue(this, (toString(launchpadId) + keyAmountUSDNInMarketingFinalized)) | |
311 | 359 | let marketingComission = fraction(totalAmountUsdnInMarketing, commission, 100) | |
312 | 360 | let unstakeAmount = (((swopfiMembersUsdnAmount + totalAmountUsdnInMarketing) + swopfiMembersComission) + marketingComission) | |
313 | 361 | if ((transferedUsdn > (swopfiMembersUsdnAmount + totalAmountUsdnInMarketing))) | |
314 | 362 | then throw("Can't transfer negative value to project") | |
315 | 363 | else { | |
316 | 364 | let inv = invoke(stakingUSDNAddress, "unlockNeutrino", [unstakeAmount, toBase58String(USDN)], nil) | |
317 | 365 | if ((inv == inv)) | |
318 | 366 | then [IntegerEntry((toString(launchpadId) + keyFinaliseHeight), height), ScriptTransfer(projectAddress, ((swopfiMembersUsdnAmount + totalAmountUsdnInMarketing) - transferedUsdn), USDN), ScriptTransfer(commissionWallet, (swopfiMembersComission + marketingComission), USDN)] | |
319 | 367 | else throw("Strict value is not equal to itself.") | |
320 | 368 | } | |
321 | 369 | } | |
322 | 370 | } | |
323 | 371 | ||
324 | 372 | ||
325 | 373 | ||
326 | 374 | @Callable(i) | |
327 | 375 | func claim (launchpadId) = { | |
328 | 376 | let userClaimStatus = valueOrElse(getBoolean(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserClaimStatus)), false) | |
329 | 377 | let boughtTickets = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtTicketsAmount)), 0) | |
330 | 378 | let boughtAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserBoughtAllocations)), 0) | |
331 | 379 | if (!(isActive)) | |
332 | 380 | then throw("DApp is inactive at this moment") | |
333 | 381 | else if (!(isDefined(getInteger(this, (toString(launchpadId) + keyFinaliseHeight))))) | |
334 | 382 | then throw("You can't claim because results are not finalized") | |
335 | 383 | else if (userClaimStatus) | |
336 | 384 | then throw("You are already claimed") | |
337 | 385 | else if (if ((boughtTickets == 0)) | |
338 | 386 | then (boughtAllocations == 0) | |
339 | 387 | else false) | |
340 | 388 | then throw("You can't claim because you don't buy anything") | |
341 | 389 | else { | |
342 | 390 | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyAssetId))) | |
343 | 391 | let wonnedTickets = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserWinnedTicketsAmount)), 0) | |
344 | 392 | let awailableAllocations = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserAvailableAllocations)), 0) | |
345 | 393 | let commission = getIntegerValue(this, (toString(launchpadId) + keyComission)) | |
346 | 394 | let allowedAllocations = min([boughtAllocations, awailableAllocations]) | |
347 | 395 | let tokenPrice = getIntegerValue(this, (toString(launchpadId) + keyPricePerToken)) | |
348 | 396 | let tokensPerTicket = getIntegerValue(this, (toString(launchpadId) + keyTokensPerTicket)) | |
349 | - | let $ | |
350 | - | let tokenStrAssetId = $ | |
351 | - | let tokenAssetName = $ | |
352 | - | let tokenDecimals = $ | |
397 | + | let $t01963419710 = getAssetInfo(tokenId) | |
398 | + | let tokenStrAssetId = $t01963419710._1 | |
399 | + | let tokenAssetName = $t01963419710._2 | |
400 | + | let tokenDecimals = $t01963419710._3 | |
353 | 401 | let ticketPrice = fraction(tokensPerTicket, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)) | |
354 | 402 | let tokensPerAllocation = getIntegerValue(this, (toString(launchpadId) + keyTokensPerAllocation)) | |
355 | 403 | let transferTokensAmount = ((wonnedTickets * tokensPerTicket) + (allowedAllocations * tokensPerAllocation)) | |
356 | 404 | let notAllowedAllocationsTokens = ((boughtAllocations - allowedAllocations) * tokensPerAllocation) | |
357 | 405 | let usdnForAllocations = fraction(fraction(notAllowedAllocationsTokens, tokenPrice, pow(10, 0, tokenDecimals, 0, 0, DOWN)), (100 + commission), 100) | |
358 | 406 | let usdnForUnwonnedTickets = fraction(((boughtTickets - wonnedTickets) * ticketPrice), (100 + commission), 100) | |
359 | 407 | if (if ((0 > usdnForAllocations)) | |
360 | 408 | then true | |
361 | 409 | else (0 > usdnForUnwonnedTickets)) | |
362 | 410 | then throw("Error with allowed allocation param or wonned tickets param please contact support") | |
363 | 411 | else { | |
364 | 412 | let returnedUsdnAmount = (usdnForAllocations + usdnForUnwonnedTickets) | |
365 | 413 | let transferUsdn = if ((returnedUsdnAmount > 0)) | |
366 | 414 | then [ScriptTransfer(i.caller, returnedUsdnAmount, USDN)] | |
367 | 415 | else nil | |
368 | 416 | let transferTokens = if ((transferTokensAmount > 0)) | |
369 | 417 | then [ScriptTransfer(i.caller, transferTokensAmount, tokenId)] | |
370 | 418 | else nil | |
371 | 419 | let inv = if ((returnedUsdnAmount > 0)) | |
372 | 420 | then invoke(stakingUSDNAddress, "unlockNeutrino", [returnedUsdnAmount, toBase58String(USDN)], nil) | |
373 | 421 | else 0 | |
374 | 422 | if ((inv == inv)) | |
375 | 423 | then (([BooleanEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserClaimStatus), true)] ++ transferTokens) ++ transferUsdn) | |
376 | 424 | else throw("Strict value is not equal to itself.") | |
377 | 425 | } | |
378 | 426 | } | |
427 | + | } | |
428 | + | ||
429 | + | ||
430 | + | ||
431 | + | @Callable(i) | |
432 | + | func claimFreezeToken (launchpadId) = { | |
433 | + | let freezeAdditionalToken = valueOrElse(getBoolean(this, (toString(launchpadId) + keyFreezeAdditionalToken)), false) | |
434 | + | if (!(isActive)) | |
435 | + | then throw("DApp is inactive at this moment") | |
436 | + | else if (!(isDefined(getInteger(this, (toString(launchpadId) + keyFinaliseHeight))))) | |
437 | + | then throw("You can't claim because results are not finalized") | |
438 | + | else if (!(freezeAdditionalToken)) | |
439 | + | then throw("There are no additional token freezing for this launchpad") | |
440 | + | else { | |
441 | + | let tokenId = fromBase58String(getStringValue(this, (toString(launchpadId) + keyFreezeTokenId))) | |
442 | + | let userTokensFreezed = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken)), 0) | |
443 | + | let startHeight = valueOrElse(getInteger(this, (toString(launchpadId) + keyStartHeight)), 0) | |
444 | + | let duration = valueOrElse(getInteger(this, (toString(launchpadId) + keyDuration)), 0) | |
445 | + | let freezeTokenDuration = getIntegerValue(this, (toString(launchpadId) + keyFreezeTokenDuration)) | |
446 | + | let blockEndHeight = ((startHeight + duration) + freezeTokenDuration) | |
447 | + | if ((userTokensFreezed == 0)) | |
448 | + | then throw("You are already claimed your tokens or not paid anything") | |
449 | + | else if ((blockEndHeight > height)) | |
450 | + | then throw(("Your tokens freezed teel " + toString(blockEndHeight))) | |
451 | + | else [ScriptTransfer(i.caller, userTokensFreezed, tokenId), IntegerEntry((((toString(i.caller) + "_") + toString(launchpadId)) + keyUserFreezeToken), 0)] | |
452 | + | } | |
379 | 453 | } | |
380 | 454 | ||
381 | 455 | ||
382 | 456 | ||
383 | 457 | @Callable(i) | |
384 | 458 | func transferUsd (launchpadId,amountUsdn) = if (!(isActive)) | |
385 | 459 | then throw("DApp is inactive") | |
386 | 460 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
387 | 461 | then throw("Only admin can call this function") | |
388 | 462 | else { | |
389 | 463 | let projectAddress = addressFromStringValue(getStringValue(this, (toString(launchpadId) + keyAddress))) | |
390 | 464 | [IntegerEntry((toString(launchpadId) + keyTransferUsd), amountUsdn), ScriptTransfer(projectAddress, amountUsdn, USDN)] | |
391 | 465 | } | |
392 | 466 | ||
393 | 467 | ||
394 | 468 | ||
395 | 469 | @Callable(i) | |
396 | 470 | func shutdown () = if (!(isActive)) | |
397 | 471 | then throw("DApp already inactive") | |
398 | 472 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
399 | 473 | then throw("Only admin can call this function") | |
400 | 474 | else [BooleanEntry(keyActive, false)] | |
401 | 475 | ||
402 | 476 | ||
403 | 477 | ||
404 | 478 | @Callable(i) | |
405 | 479 | func activate () = if (isActive) | |
406 | 480 | then throw("DApp already active") | |
407 | 481 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
408 | 482 | then throw("Only admin can call this function") | |
409 | 483 | else [BooleanEntry(keyActive, true)] | |
410 | 484 | ||
411 | 485 | ||
412 | 486 | @Verifier(tx) | |
413 | 487 | func verify () = { | |
414 | 488 | let multiSignedByAdmins = { | |
415 | 489 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
416 | 490 | then 1 | |
417 | 491 | else 0 | |
418 | 492 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
419 | 493 | then 1 | |
420 | 494 | else 0 | |
421 | 495 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
422 | 496 | then 1 | |
423 | 497 | else 0 | |
424 | 498 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
425 | 499 | } | |
426 | 500 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
427 | 501 | then true | |
428 | 502 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
429 | 503 | then true | |
430 | 504 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
431 | 505 | then true | |
432 | 506 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
433 | 507 | match tx { | |
434 | 508 | case dtx: DataTransaction => | |
435 | 509 | if (valueOrElse(getBoolean(oracle, keyLaunchpadDataTransactionStatus), false)) | |
436 | 510 | then signedByAdmin | |
437 | 511 | else false | |
438 | 512 | case _ => | |
439 | 513 | multiSignedByAdmins | |
440 | 514 | } | |
441 | 515 | } | |
442 | 516 |
github/deemru/w8io/169f3d6 101.10 ms ◑