tx · 6zdLEChfZoswniSgxAyr7cH79hNjNdyiDwcKnpnAvyCw 3N5JdsH76XpMUvsW8vPfqJP5iJcLpw44S2G: -0.01700000 Waves 2022.10.26 23:51 [2289901] smart account 3N5JdsH76XpMUvsW8vPfqJP5iJcLpw44S2G > SELF 0.00000000 Waves
{ "type": 13, "id": "6zdLEChfZoswniSgxAyr7cH79hNjNdyiDwcKnpnAvyCw", "fee": 1700000, "feeAssetId": null, "timestamp": 1666817520755, "version": 2, "chainId": 84, "sender": "3N5JdsH76XpMUvsW8vPfqJP5iJcLpw44S2G", "senderPublicKey": "E4DDBXUX5PAQEdxA2XkP6PcTsq1fPjcys7t3SwtQACYS", "proofs": [ "5ovr99MhJqK5Xa4cmzoEREo1pgnmtjTo9HcZ1wKezqfRjfA35YKjGWzTnj9uKdDjqyukmXbbHWzNVRSiSDJVQbwH" ], "script": "base64:BgJFCAISAwoBCBIAEgMKAQgSAwoBCBIDCgEIEgcKBQgIAQEIEgMKAQgSBAoCCAgSBQoDCAgBEgMKAQgSAwoBCBIGCgQICAgILQAFd2F2ZXMAgMLXLwAOdGlja2V0UHJpY2VJbnQAwIQ9AAt0aWNrZXRQcmljZQUOdGlja2V0UHJpY2VJbnQABmludkZlZQCgwh4AEndpdGhkcmF3RmVlUGVyY2VudAAFABZmZWVDb2xsZWN0b3JBZGRyZXNzS2V5AhNmZWVDb2xsZWN0b3JBZGRyZXNzABl0b3VybmFtZW50QnV5SW5GZWVQZXJjZW50AAoADmRlcG9zaXRBc3NldElkAiw1dWUxZml1VjZqNlVCcjZYZjI4UW1zNnk1RnF6S3RxdmF4eGh3dTdoVFE1OAAfYWxsb3dlZFNwZWNpYWxUb3VybmFtZW50Q3JlYXRvcgIjM04yd3RUdDFHUm5VaUF6YWJkcXAxQ0MyVVhzQTFCekdtYXQBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2g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Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let waves = 100000000 | |
5 | + | ||
6 | + | let ticketPriceInt = 1000000 | |
7 | + | ||
8 | + | let ticketPrice = ticketPriceInt | |
9 | + | ||
10 | + | let invFee = 500000 | |
11 | + | ||
12 | + | let withdrawFeePercent = 5 | |
13 | + | ||
14 | + | let feeCollectorAddressKey = "feeCollectorAddress" | |
15 | + | ||
16 | + | let tournamentBuyInFeePercent = 10 | |
17 | + | ||
18 | + | let depositAssetId = "5ue1fiuV6j6UBr6Xf28Qms6y5FqzKtqvaxxhwu7hTQ58" | |
19 | + | ||
20 | + | let allowedSpecialTournamentCreator = "3N2wtTt1GRnUiAzabdqp1CC2UXsA1BzGmat" | |
21 | + | ||
22 | + | func tryGetInteger (key) = match getInteger(this, key) { | |
23 | + | case b: Int => | |
24 | + | b | |
25 | + | case _ => | |
26 | + | 0 | |
27 | + | } | |
28 | + | ||
29 | + | ||
30 | + | func getTicketsCountKey (addressString) = (addressString + "_ticketsCount") | |
31 | + | ||
32 | + | ||
33 | + | func buyInAmountForTournamentForAccount (tournamentId,account) = ((tournamentId + "_buyInAmountForAccount_") + account) | |
34 | + | ||
35 | + | ||
36 | + | func buyInAssetIdForTournamentForAccount (tournamentId,account) = ((tournamentId + "_buyInAssetIdForAccount_") + account) | |
37 | + | ||
38 | + | ||
39 | + | func ticketForTournamentForAccount (tournamentId,account) = ((tournamentId + "_ticketForAccount_") + account) | |
40 | + | ||
41 | + | ||
42 | + | func tournamentTotalBuyInCollectedAmountKey (tournamentId) = (tournamentId + "_tournamentTotalBuyInCollectedAmount") | |
43 | + | ||
44 | + | ||
45 | + | func tournamentTotalBuyInCollectedAmountMinusFeesKey (tournamentId) = (tournamentId + "_tournamentTotalBuyInCollectedAmountMinusFees") | |
46 | + | ||
47 | + | ||
48 | + | func tournamentCreatorKey (tournamentId) = (tournamentId + "_tournamentCreator") | |
49 | + | ||
50 | + | ||
51 | + | func tournamentNameKey (tournamentId) = (tournamentId + "_tournamentName") | |
52 | + | ||
53 | + | ||
54 | + | func tournamentPrizeAmountKey (tournamentId) = (tournamentId + "_tournamentPrizeAmount") | |
55 | + | ||
56 | + | ||
57 | + | func tournamentMaxPlayersCountKey (tournamentId) = (tournamentId + "_tournamentMaxPlayersCount") | |
58 | + | ||
59 | + | ||
60 | + | func tournamentPlayersCountKey (tournamentId) = (tournamentId + "_tournamentPlayersCount") | |
61 | + | ||
62 | + | ||
63 | + | func tournamentPrizeAssetIdKey (tournamentId) = (tournamentId + "_tournamentPrizeAssetId") | |
64 | + | ||
65 | + | ||
66 | + | func tournamentPrizeAssetNameKey (tournamentId) = (tournamentId + "_tournamentPrizeAssetName") | |
67 | + | ||
68 | + | ||
69 | + | func tournamentBuyInAmountKey (tournamentId) = (tournamentId + "_tournamentBuyInAmount") | |
70 | + | ||
71 | + | ||
72 | + | func tournamentBuyInAssetIdKey (tournamentId) = (tournamentId + "_tournamentBuyInAssetId") | |
73 | + | ||
74 | + | ||
75 | + | func tournamentBuyInAssetNameKey (tournamentId) = (tournamentId + "_tournamentBuyInAssetName") | |
76 | + | ||
77 | + | ||
78 | + | func tournamentBuyInAssetDecimalsKey (tournamentId) = (tournamentId + "_tournamentBuyInAssetDecimals") | |
79 | + | ||
80 | + | ||
81 | + | func tournamentPrizeAssetDecimalsKey (tournamentId) = (tournamentId + "_tournamentPrizeAssetDecimals") | |
82 | + | ||
83 | + | ||
84 | + | func tournamentStatusKey (tournamentId) = (tournamentId + "_tournamentStatus") | |
85 | + | ||
86 | + | ||
87 | + | func tournamentBuyInFeeCollectedKey (tournamentId) = (tournamentId + "_tournamentBuyInFeeCollected") | |
88 | + | ||
89 | + | ||
90 | + | func tournamentServiceFeeCollectedKey (tournamentId) = (tournamentId + "_tournamentServiceFeeCollected") | |
91 | + | ||
92 | + | ||
93 | + | func tournamentWinningTransactionIdKey (tournamentId) = (tournamentId + "_tournamentWinningTransactionId") | |
94 | + | ||
95 | + | ||
96 | + | func gameWinnerKey (gameId) = (gameId + "_winner") | |
97 | + | ||
98 | + | ||
99 | + | func addressAvailableFundsKey (address) = (address + "_availableFunds") | |
100 | + | ||
101 | + | ||
102 | + | func addressTotalLockedFundsKey (address) = (address + "_totalLockedFunds") | |
103 | + | ||
104 | + | ||
105 | + | func addressLockedFundsTotalHistoryKey (address) = (address + "_lockedFundsTotalHistory") | |
106 | + | ||
107 | + | ||
108 | + | func addressLockedFundsForGameKey (address,gameId) = ((address + "_lockedFunds_") + gameId) | |
109 | + | ||
110 | + | ||
111 | + | func addressAvailableRewardsKey (address) = (address + "_availableRewards") | |
112 | + | ||
113 | + | ||
114 | + | func videoPokerBetForAccount (gameId,account) = ((gameId + "_videoPokerBetFor_") + account) | |
115 | + | ||
116 | + | ||
117 | + | func videoPokerCardsDrawnKey (gameId) = (gameId + "_videoPokerCardsDrawn") | |
118 | + | ||
119 | + | ||
120 | + | func videoPokerResultKey (gameId) = (gameId + "_videoPokerResult") | |
121 | + | ||
122 | + | ||
123 | + | func videoPokerResultProfitKey (gameId) = (gameId + "_videoPokerResultProfit") | |
124 | + | ||
125 | + | ||
126 | + | func videoPokerStatusKey (gameId) = (gameId + "_videoPokerStatus") | |
127 | + | ||
128 | + | ||
129 | + | func getTicketsCount (addressString) = tryGetInteger(getTicketsCountKey(addressString)) | |
130 | + | ||
131 | + | ||
132 | + | func consumeTicket (playerAddr) = { | |
133 | + | let currentTicketCount = getTicketsCount(playerAddr) | |
134 | + | let newCurrentTicketCount = (currentTicketCount - 1) | |
135 | + | if ((0 > newCurrentTicketCount)) | |
136 | + | then 0 | |
137 | + | else newCurrentTicketCount | |
138 | + | } | |
139 | + | ||
140 | + | ||
141 | + | @Callable(i) | |
142 | + | func setFeeCollectorAddress (collectorAddr) = if ((i.caller != this)) | |
143 | + | then throw("Admin Only") | |
144 | + | else [StringEntry(feeCollectorAddressKey, collectorAddr)] | |
145 | + | ||
146 | + | ||
147 | + | ||
148 | + | @Callable(i) | |
149 | + | func depositFunds () = { | |
150 | + | let pmt = if ((size(i.payments) == 1)) | |
151 | + | then i.payments[0] | |
152 | + | else throw("Please attach exactly one payment") | |
153 | + | if ((pmt.assetId != fromBase58String(depositAssetId))) | |
154 | + | then throw("You can only deposit USDN") | |
155 | + | else { | |
156 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
157 | + | let currentAvailableFunds = tryGetInteger(addressAvailableFundsKey(callerAddrStr)) | |
158 | + | $Tuple2([IntegerEntry(addressAvailableFundsKey(callerAddrStr), (currentAvailableFunds + pmt.amount))], 1) | |
159 | + | } | |
160 | + | } | |
161 | + | ||
162 | + | ||
163 | + | ||
164 | + | @Callable(i) | |
165 | + | func cancelSignUpToTournament (tournamentId) = { | |
166 | + | let tournamentStatus = getStringValue(tournamentStatusKey(tournamentId)) | |
167 | + | if ((tournamentStatus != "registration")) | |
168 | + | then throw("Tournament is not in registration phase!") | |
169 | + | else { | |
170 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
171 | + | let paidBuyInAmount = getIntegerValue(buyInAmountForTournamentForAccount(tournamentId, callerAddrStr)) | |
172 | + | let paidBuyInAssetId = getStringValue(buyInAssetIdForTournamentForAccount(tournamentId, callerAddrStr)) | |
173 | + | let alreadyRegisteredPlayersCount = tryGetInteger(tournamentPlayersCountKey(tournamentId)) | |
174 | + | let totalBuyInCollectedAmount = (tryGetInteger(tournamentTotalBuyInCollectedAmountKey(tournamentId)) - paidBuyInAmount) | |
175 | + | let feesTaken = fraction(totalBuyInCollectedAmount, tournamentBuyInFeePercent, 100) | |
176 | + | $Tuple2([ScriptTransfer(addressFromStringValue(callerAddrStr), paidBuyInAmount, fromBase58String(paidBuyInAssetId)), DeleteEntry(ticketForTournamentForAccount(tournamentId, callerAddrStr)), DeleteEntry(buyInAmountForTournamentForAccount(tournamentId, callerAddrStr)), DeleteEntry(buyInAssetIdForTournamentForAccount(tournamentId, callerAddrStr)), IntegerEntry(tournamentPlayersCountKey(tournamentId), (alreadyRegisteredPlayersCount - 1)), IntegerEntry(tournamentTotalBuyInCollectedAmountKey(tournamentId), totalBuyInCollectedAmount), IntegerEntry(tournamentTotalBuyInCollectedAmountMinusFeesKey(tournamentId), (totalBuyInCollectedAmount - feesTaken))], 1) | |
177 | + | } | |
178 | + | } | |
179 | + | ||
180 | + | ||
181 | + | ||
182 | + | @Callable(i) | |
183 | + | func signUpToTournament (tournamentId) = { | |
184 | + | let maxPlayersCount = getIntegerValue(this, tournamentMaxPlayersCountKey(tournamentId)) | |
185 | + | let alreadyRegisteredPlayersCount = tryGetInteger(tournamentPlayersCountKey(tournamentId)) | |
186 | + | let tournamentStatus = getStringValue(tournamentStatusKey(tournamentId)) | |
187 | + | if (if ((tournamentStatus != "registration")) | |
188 | + | then (tournamentStatus != "started") | |
189 | + | else false) | |
190 | + | then throw("Tournament is not in registration phase!") | |
191 | + | else if ((alreadyRegisteredPlayersCount == maxPlayersCount)) | |
192 | + | then throw("Tournament is currently full, please try again later!") | |
193 | + | else { | |
194 | + | let pmt = if ((size(i.payments) == 1)) | |
195 | + | then i.payments[0] | |
196 | + | else throw("Please attach exactly one payment") | |
197 | + | let buyInAssetid = match pmt.assetId { | |
198 | + | case b: Unit => | |
199 | + | "" | |
200 | + | case b: ByteVector => | |
201 | + | toBase58String(b) | |
202 | + | case _ => | |
203 | + | throw("Match error") | |
204 | + | } | |
205 | + | let buyInRequiredAmount = getIntegerValue(this, tournamentBuyInAmountKey(tournamentId)) | |
206 | + | let buyInRequiredAssetId = getStringValue(this, tournamentBuyInAssetIdKey(tournamentId)) | |
207 | + | if ((buyInRequiredAmount != pmt.amount)) | |
208 | + | then throw(("Attached payment amount is invalid, must be " + toString(buyInRequiredAmount))) | |
209 | + | else if ((buyInRequiredAssetId != buyInAssetid)) | |
210 | + | then throw(("Attached payment asset id is invalid, must be " + buyInRequiredAssetId)) | |
211 | + | else { | |
212 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
213 | + | let totalBuyInCollectedAmount = (tryGetInteger(tournamentTotalBuyInCollectedAmountKey(tournamentId)) + pmt.amount) | |
214 | + | let feesTaken = fraction(totalBuyInCollectedAmount, tournamentBuyInFeePercent, 100) | |
215 | + | $Tuple2([BooleanEntry(ticketForTournamentForAccount(tournamentId, callerAddrStr), true), IntegerEntry(buyInAmountForTournamentForAccount(tournamentId, callerAddrStr), pmt.amount), StringEntry(buyInAssetIdForTournamentForAccount(tournamentId, callerAddrStr), buyInAssetid), IntegerEntry(tournamentPlayersCountKey(tournamentId), (alreadyRegisteredPlayersCount + 1)), IntegerEntry(tournamentTotalBuyInCollectedAmountKey(tournamentId), totalBuyInCollectedAmount), IntegerEntry(tournamentTotalBuyInCollectedAmountMinusFeesKey(tournamentId), (totalBuyInCollectedAmount - feesTaken))], 1) | |
216 | + | } | |
217 | + | } | |
218 | + | } | |
219 | + | ||
220 | + | ||
221 | + | ||
222 | + | @Callable(i) | |
223 | + | func cancelTournament (tournamentId) = { | |
224 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
225 | + | let tournamentCreator = getStringValue(tournamentCreatorKey(tournamentId)) | |
226 | + | let creatorCheck = if ((tournamentCreator == callerAddrStr)) | |
227 | + | then true | |
228 | + | else if ((i.caller == this)) | |
229 | + | then true | |
230 | + | else throw("Only tournament creator can cancel it!") | |
231 | + | if ((creatorCheck == creatorCheck)) | |
232 | + | then { | |
233 | + | let tournamentStatus = getStringValue(tournamentStatusKey(tournamentId)) | |
234 | + | if (if ((i.caller != this)) | |
235 | + | then (tournamentStatus != "registration") | |
236 | + | else false) | |
237 | + | then throw("Tournament is not in registration phase!") | |
238 | + | else { | |
239 | + | let alreadyRegisteredPlayersCount = tryGetInteger(tournamentPlayersCountKey(tournamentId)) | |
240 | + | if ((alreadyRegisteredPlayersCount > 0)) | |
241 | + | then throw("Cannot cancel a tournament when players are already registered to it!") | |
242 | + | else { | |
243 | + | let tournamentPrizeAmount = getIntegerValue(tournamentPrizeAmountKey(tournamentId)) | |
244 | + | let tournamentPrizeAssetId = getStringValue(tournamentPrizeAssetIdKey(tournamentId)) | |
245 | + | $Tuple2([DeleteEntry(tournamentPrizeAmountKey(tournamentId)), DeleteEntry(tournamentPlayersCountKey(tournamentId)), DeleteEntry(tournamentMaxPlayersCountKey(tournamentId)), DeleteEntry(tournamentPrizeAssetIdKey(tournamentId)), DeleteEntry(tournamentPrizeAssetNameKey(tournamentId)), DeleteEntry(tournamentPrizeAssetDecimalsKey(tournamentId)), DeleteEntry(tournamentStatusKey(tournamentId)), DeleteEntry(tournamentBuyInAmountKey(tournamentId)), DeleteEntry(tournamentBuyInAssetNameKey(tournamentId)), DeleteEntry(tournamentBuyInAssetDecimalsKey(tournamentId)), DeleteEntry(tournamentBuyInAssetIdKey(tournamentId)), DeleteEntry(tournamentNameKey(tournamentId)), DeleteEntry(tournamentCreatorKey(tournamentId)), ScriptTransfer(addressFromStringValue(tournamentCreator), tournamentPrizeAmount, fromBase58String(tournamentPrizeAssetId))], 1) | |
246 | + | } | |
247 | + | } | |
248 | + | } | |
249 | + | else throw("Strict value is not equal to itself.") | |
250 | + | } | |
251 | + | ||
252 | + | ||
253 | + | ||
254 | + | @Callable(i) | |
255 | + | func createTournament (tournamentId,name,playersCount,buyInAmount,buyInAssetId) = { | |
256 | + | let pmt = if ((size(i.payments) == 1)) | |
257 | + | then i.payments[0] | |
258 | + | else { | |
259 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
260 | + | if ((callerAddrStr == allowedSpecialTournamentCreator)) | |
261 | + | then AttachedPayment(unit, 0) | |
262 | + | else throw("Please attach exactly one payment") | |
263 | + | } | |
264 | + | let tournamentCreator = match getString(tournamentCreatorKey(tournamentId)) { | |
265 | + | case creator: String => | |
266 | + | throw(("Tournament already exists with this id " + tournamentId)) | |
267 | + | case _ => | |
268 | + | unit | |
269 | + | } | |
270 | + | if ((tournamentCreator == tournamentCreator)) | |
271 | + | then { | |
272 | + | let prizeAssetId = match pmt.assetId { | |
273 | + | case b: Unit => | |
274 | + | "" | |
275 | + | case b: ByteVector => | |
276 | + | toBase58String(b) | |
277 | + | case _ => | |
278 | + | throw("Match error") | |
279 | + | } | |
280 | + | let assetDetails = match pmt.assetId { | |
281 | + | case b: Unit => | |
282 | + | ["Waves", 8] | |
283 | + | case b: ByteVector => | |
284 | + | match assetInfo(b) { | |
285 | + | case asset: Asset => | |
286 | + | [asset.name, asset.decimals] | |
287 | + | case _ => | |
288 | + | throw("Can't find asset") | |
289 | + | } | |
290 | + | case _ => | |
291 | + | throw("Match error") | |
292 | + | } | |
293 | + | let buyInAsset = match assetInfo(fromBase58String(buyInAssetId)) { | |
294 | + | case asset: Asset => | |
295 | + | [asset.name, asset.decimals] | |
296 | + | case _ => | |
297 | + | ["", 0] | |
298 | + | } | |
299 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
300 | + | $Tuple2([IntegerEntry(tournamentPrizeAmountKey(tournamentId), pmt.amount), IntegerEntry(tournamentPlayersCountKey(tournamentId), 0), IntegerEntry(tournamentMaxPlayersCountKey(tournamentId), playersCount), StringEntry(tournamentPrizeAssetIdKey(tournamentId), prizeAssetId), StringEntry(tournamentPrizeAssetNameKey(tournamentId), { | |
301 | + | let @ = assetDetails[0] | |
302 | + | if ($isInstanceOf(@, "String")) | |
303 | + | then @ | |
304 | + | else throw(($getType(@) + " couldn't be cast to String")) | |
305 | + | }), IntegerEntry(tournamentPrizeAssetDecimalsKey(tournamentId), { | |
306 | + | let @ = assetDetails[1] | |
307 | + | if ($isInstanceOf(@, "Int")) | |
308 | + | then @ | |
309 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
310 | + | }), StringEntry(tournamentStatusKey(tournamentId), "registration"), IntegerEntry(tournamentBuyInAmountKey(tournamentId), buyInAmount), StringEntry(tournamentBuyInAssetNameKey(tournamentId), { | |
311 | + | let @ = buyInAsset[0] | |
312 | + | if ($isInstanceOf(@, "String")) | |
313 | + | then @ | |
314 | + | else throw(($getType(@) + " couldn't be cast to String")) | |
315 | + | }), IntegerEntry(tournamentBuyInAssetDecimalsKey(tournamentId), { | |
316 | + | let @ = buyInAsset[1] | |
317 | + | if ($isInstanceOf(@, "Int")) | |
318 | + | then @ | |
319 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
320 | + | }), StringEntry(tournamentBuyInAssetIdKey(tournamentId), buyInAssetId), StringEntry(tournamentNameKey(tournamentId), name), StringEntry(tournamentCreatorKey(tournamentId), callerAddrStr)], 1) | |
321 | + | } | |
322 | + | else throw("Strict value is not equal to itself.") | |
323 | + | } | |
324 | + | ||
325 | + | ||
326 | + | ||
327 | + | @Callable(i) | |
328 | + | func startTournament (tournamentId) = if ((i.caller != this)) | |
329 | + | then throw("Admin Only") | |
330 | + | else $Tuple2([StringEntry(tournamentStatusKey(tournamentId), "started")], 1) | |
331 | + | ||
332 | + | ||
333 | + | ||
334 | + | @Callable(i) | |
335 | + | func finishTournament (tournamentId,winningTransfertTransactionId) = if ((i.caller != this)) | |
336 | + | then throw("Admin Only") | |
337 | + | else { | |
338 | + | let tournamentCreator = getStringValue(tournamentCreatorKey(tournamentId)) | |
339 | + | let tournamentTotalBuyInAmount = tryGetInteger(tournamentTotalBuyInCollectedAmountKey(tournamentId)) | |
340 | + | let tournamentBuyInAmount = getIntegerValue(tournamentBuyInAmountKey(tournamentId)) | |
341 | + | let tournamentBuyInAssetId = match getString(tournamentBuyInAssetIdKey(tournamentId)) { | |
342 | + | case id: String => | |
343 | + | if ((id == "")) | |
344 | + | then unit | |
345 | + | else fromBase58String(id) | |
346 | + | case _ => | |
347 | + | unit | |
348 | + | } | |
349 | + | let tournamentBuyInFee = fraction(tournamentTotalBuyInAmount, tournamentBuyInFeePercent, 100) | |
350 | + | let tournamentPrizeAmount = getIntegerValue(tournamentPrizeAmountKey(tournamentId)) | |
351 | + | if ((tournamentPrizeAmount > 0)) | |
352 | + | then $Tuple2([StringEntry(tournamentWinningTransactionIdKey(tournamentId), winningTransfertTransactionId), StringEntry(tournamentStatusKey(tournamentId), "finished"), IntegerEntry(tournamentBuyInFeeCollectedKey(tournamentId), tournamentBuyInFee), ScriptTransfer(addressFromStringValue(tournamentCreator), (tournamentTotalBuyInAmount - tournamentBuyInFee), tournamentBuyInAssetId)], 1) | |
353 | + | else { | |
354 | + | let serviceFee = fraction(tournamentBuyInFee, 20, 100) | |
355 | + | $Tuple2([StringEntry(tournamentWinningTransactionIdKey(tournamentId), winningTransfertTransactionId), StringEntry(tournamentStatusKey(tournamentId), "finished"), IntegerEntry(tournamentBuyInFeeCollectedKey(tournamentId), tournamentBuyInFee), IntegerEntry(tournamentServiceFeeCollectedKey(tournamentId), serviceFee), ScriptTransfer(addressFromStringValue(tournamentCreator), (tournamentBuyInFee - serviceFee), tournamentBuyInAssetId)], 1) | |
356 | + | } | |
357 | + | } | |
358 | + | ||
359 | + | ||
360 | + | ||
361 | + | @Callable(i) | |
362 | + | func playerExitGame (gameId,playerAddr,exitStackAmount) = if ((i.caller != this)) | |
363 | + | then throw("Admin Only") | |
364 | + | else { | |
365 | + | let currentTotalLockedFunds = tryGetInteger(addressTotalLockedFundsKey(playerAddr)) | |
366 | + | let currentGameLockedAmountForPlayer = tryGetInteger(addressLockedFundsForGameKey(playerAddr, gameId)) | |
367 | + | $Tuple2([IntegerEntry(addressTotalLockedFundsKey(playerAddr), (currentTotalLockedFunds - currentGameLockedAmountForPlayer)), IntegerEntry(addressLockedFundsForGameKey(playerAddr, gameId), 0), ScriptTransfer(addressFromStringValue(playerAddr), exitStackAmount, fromBase58String(depositAssetId))], 1) | |
368 | + | } | |
369 | + | ||
370 | + | ||
371 | + | ||
372 | + | @Callable(i) | |
373 | + | func lockFundsForGame (gameId) = { | |
374 | + | let pmt = if ((size(i.payments) == 1)) | |
375 | + | then i.payments[0] | |
376 | + | else throw("Please attach exactly one payment") | |
377 | + | if ((pmt.assetId != fromBase58String(depositAssetId))) | |
378 | + | then throw("You can only deposit USDN") | |
379 | + | else { | |
380 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
381 | + | let currentTotalLockedFunds = tryGetInteger(addressTotalLockedFundsKey(callerAddrStr)) | |
382 | + | let currentLockedFundsTotalHistory = tryGetInteger(addressLockedFundsTotalHistoryKey(callerAddrStr)) | |
383 | + | $Tuple2([IntegerEntry(addressTotalLockedFundsKey(callerAddrStr), (currentTotalLockedFunds + pmt.amount)), IntegerEntry(addressLockedFundsTotalHistoryKey(callerAddrStr), (currentLockedFundsTotalHistory + pmt.amount)), IntegerEntry(addressLockedFundsForGameKey(callerAddrStr, gameId), pmt.amount)], 1) | |
384 | + | } | |
385 | + | } | |
386 | + | ||
387 | + | ||
388 | + | ||
389 | + | @Callable(i) | |
390 | + | func betOnVideoPokerGame (gameId) = { | |
391 | + | let pmt = if ((size(i.payments) == 1)) | |
392 | + | then i.payments[0] | |
393 | + | else throw("Please attach exactly one payment") | |
394 | + | if ((pmt.assetId != fromBase58String(depositAssetId))) | |
395 | + | then throw("You can only deposit USDN") | |
396 | + | else { | |
397 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
398 | + | $Tuple2([IntegerEntry(videoPokerBetForAccount(gameId, callerAddrStr), pmt.amount), StringEntry(videoPokerStatusKey(gameId), "created")], 1) | |
399 | + | } | |
400 | + | } | |
401 | + | ||
402 | + | ||
403 | + | ||
404 | + | @Callable(i) | |
405 | + | func finishVideoPokerGame (gameId,playerAddr,result,cardsDrawn) = if ((i.caller != this)) | |
406 | + | then throw("Admin Only") | |
407 | + | else { | |
408 | + | let betAmount = getIntegerValue(videoPokerBetForAccount(gameId, playerAddr)) | |
409 | + | let currentGameStatus = getStringValue(videoPokerStatusKey(gameId)) | |
410 | + | let checkStatus = if ((currentGameStatus == "created")) | |
411 | + | then true | |
412 | + | else throw("Game is not in the correct status!") | |
413 | + | if ((checkStatus == checkStatus)) | |
414 | + | then { | |
415 | + | let betMultiplier = if ((result == "Pair")) | |
416 | + | then 1 | |
417 | + | else if ((result == "Two Pair")) | |
418 | + | then 2 | |
419 | + | else if ((result == "Three of a Kind")) | |
420 | + | then 3 | |
421 | + | else if ((result == "Straight")) | |
422 | + | then 4 | |
423 | + | else if ((result == "Flush")) | |
424 | + | then 6 | |
425 | + | else if ((result == "Full House")) | |
426 | + | then 9 | |
427 | + | else if ((result == "Four of a Kind")) | |
428 | + | then 25 | |
429 | + | else if ((result == "Straight Flush")) | |
430 | + | then 50 | |
431 | + | else if ((result == "Royal Flush")) | |
432 | + | then 800 | |
433 | + | else 0 | |
434 | + | if ((betMultiplier == betMultiplier)) | |
435 | + | then { | |
436 | + | let amountWon = (betAmount * betMultiplier) | |
437 | + | $Tuple2([StringEntry(videoPokerCardsDrawnKey(gameId), cardsDrawn), StringEntry(videoPokerResultKey(gameId), result), IntegerEntry(videoPokerResultProfitKey(gameId), amountWon), StringEntry(videoPokerStatusKey(gameId), "finished"), ScriptTransfer(addressFromStringValue(playerAddr), amountWon, fromBase58String(depositAssetId))], 1) | |
438 | + | } | |
439 | + | else throw("Strict value is not equal to itself.") | |
440 | + | } | |
441 | + | else throw("Strict value is not equal to itself.") | |
442 | + | } | |
443 | + | ||
444 | + | ||
445 | + | @Verifier(tx) | |
446 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
447 | + |
github/deemru/w8io/026f985 37.69 ms ◑