tx · ER8VkWuobQN1LgvhbDq9ELLWQWy8V3HtwQ7JA5hP7qFz 3MurDyNgfxx8P2bKvpa3qJufpkzSjWS3KeR: -0.01800000 Waves 2022.11.05 01:10 [2302944] smart account 3MurDyNgfxx8P2bKvpa3qJufpkzSjWS3KeR > SELF 0.00000000 Waves
{ "type": 13, "id": "ER8VkWuobQN1LgvhbDq9ELLWQWy8V3HtwQ7JA5hP7qFz", "fee": 1800000, "feeAssetId": null, "timestamp": 1667599872438, "version": 2, "chainId": 84, "sender": "3MurDyNgfxx8P2bKvpa3qJufpkzSjWS3KeR", "senderPublicKey": "E67VA1AqhWbJwYxXKM6czJVdY57tvZks9J7dpU1L1nLt", "proofs": [ "mRgrwVefT9LjgqzL5MJWTSep5TKNX4NX3wy8DbT5at5R1GoaRMthzcTxJkuKCcbrRBLgX4KbjSPpXLEJYXAwYKQ" ], "script": "base64:BgJNCAISAwoBCBIAEgASBQoDCAEBEgMKAQgSAwoBCBIDCgEIEgcKBQgIAQEIEgMKAQgSBAoCCAgSBQoDCAgBEgMKAQgSAwoBCBIFCgMICAguAAV3YXZlcwCAwtcvAA50aWNrZXRQcmljZUludADAhD0AC3RpY2tldFByaWNlBQ50aWNrZXRQcmljZUludAAGaW52RmVlAKDCHgASd2l0aGRyYXdGZWVQZXJjZW50AAUAFmZlZUNvbGxlY3RvckFkZHJlc3NLZXkCE2ZlZUNvbGxlY3RvckFkZHJlc3MAGXRvdXJuYW1lbnRCdXlJbkZlZVBlcmNlbnQACgAOZGVwb3NpdEFzc2V0SWQCLDV1ZTFmaXVWNmo2VUJyNlhmMjhRbXM2eTVGcXpLdHF2YXh4aHd1N2hUUTU4AB9hbGxvd2VkU3BlY2lhbFRvdXJuYW1lbnRDcmVhdG9yAiMzTjgxUVFwZzZRV29vWWpFbXFWZzJ6ZUVIYmY5TVVBNGpSRgENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2g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AgCCQEMSW50ZWdlckVudHJ5AgkBGXZpZGVvUG9rZXJSZXN1bHRQcm9maXRLZXkBBQZnYW1lSWQFCWFtb3VudFdvbgkAzAgCCQELU3RyaW5nRW50cnkCCQETdmlkZW9Qb2tlclN0YXR1c0tleQEFBmdhbWVJZAIIZmluaXNoZWQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBEUBleHRyTmF0aXZlKDEwNjIpAQUKcGxheWVyQWRkcgUJYW1vdW50V29uCQDZBAEFDmRlcG9zaXRBc3NldElkBQNuaWwAAQkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnlK9w4", "height": 2302944, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted 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 = "3N81QQpg6QWooYjEmqVg2zeEHbf9MUA4jRF" | |
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 videoPokerPlayerAddressKey (gameId) = (gameId + "_videoPokerPlayerAddress") | |
130 | + | ||
131 | + | ||
132 | + | func getTicketsCount (addressString) = tryGetInteger(getTicketsCountKey(addressString)) | |
133 | + | ||
134 | + | ||
135 | + | func consumeTicket (playerAddr) = { | |
136 | + | let currentTicketCount = getTicketsCount(playerAddr) | |
137 | + | let newCurrentTicketCount = (currentTicketCount - 1) | |
138 | + | if ((0 > newCurrentTicketCount)) | |
139 | + | then 0 | |
140 | + | else newCurrentTicketCount | |
141 | + | } | |
142 | + | ||
143 | + | ||
144 | + | @Callable(i) | |
145 | + | func setFeeCollectorAddress (collectorAddr) = if ((i.caller != this)) | |
146 | + | then throw("Admin Only") | |
147 | + | else [StringEntry(feeCollectorAddressKey, collectorAddr)] | |
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | @Callable(i) | |
152 | + | func depositFunds () = { | |
153 | + | let pmt = if ((size(i.payments) == 1)) | |
154 | + | then i.payments[0] | |
155 | + | else throw("Please attach exactly one payment") | |
156 | + | if ((pmt.assetId != fromBase58String(depositAssetId))) | |
157 | + | then throw("You can only deposit USDN") | |
158 | + | else { | |
159 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
160 | + | let currentAvailableFunds = tryGetInteger(addressAvailableFundsKey(callerAddrStr)) | |
161 | + | $Tuple2([IntegerEntry(addressAvailableFundsKey(callerAddrStr), (currentAvailableFunds + pmt.amount))], 1) | |
162 | + | } | |
163 | + | } | |
164 | + | ||
165 | + | ||
166 | + | ||
167 | + | @Callable(i) | |
168 | + | func withdrawFunds () = { | |
169 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
170 | + | let currentAvailableFunds = tryGetInteger(addressAvailableFundsKey(callerAddrStr)) | |
171 | + | $Tuple2([IntegerEntry(addressAvailableFundsKey(callerAddrStr), 0), ScriptTransfer(addressFromStringValue(callerAddrStr), currentAvailableFunds, fromBase58String(depositAssetId))], 1) | |
172 | + | } | |
173 | + | ||
174 | + | ||
175 | + | ||
176 | + | @Callable(i) | |
177 | + | func finishDiceGame (playerAddress,bet,resultMultiplier) = if ((i.caller != this)) | |
178 | + | then throw("Admin Only") | |
179 | + | else { | |
180 | + | let currentAvailableFunds = tryGetInteger(addressAvailableFundsKey(playerAddress)) | |
181 | + | let betCheck = if ((bet > currentAvailableFunds)) | |
182 | + | then throw("Not enough available funds to cover the bet!") | |
183 | + | else true | |
184 | + | if ((betCheck == betCheck)) | |
185 | + | then $Tuple2([IntegerEntry(addressAvailableFundsKey(playerAddress), ((currentAvailableFunds - bet) + (bet * resultMultiplier))), ScriptTransfer(addressFromStringValue(playerAddress), currentAvailableFunds, fromBase58String(depositAssetId))], 1) | |
186 | + | else throw("Strict value is not equal to itself.") | |
187 | + | } | |
188 | + | ||
189 | + | ||
190 | + | ||
191 | + | @Callable(i) | |
192 | + | func cancelSignUpToTournament (tournamentId) = { | |
193 | + | let tournamentStatus = getStringValue(tournamentStatusKey(tournamentId)) | |
194 | + | if ((tournamentStatus != "registration")) | |
195 | + | then throw("Tournament is not in registration phase!") | |
196 | + | else { | |
197 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
198 | + | let paidBuyInAmount = getIntegerValue(buyInAmountForTournamentForAccount(tournamentId, callerAddrStr)) | |
199 | + | let paidBuyInAssetId = getStringValue(buyInAssetIdForTournamentForAccount(tournamentId, callerAddrStr)) | |
200 | + | let alreadyRegisteredPlayersCount = tryGetInteger(tournamentPlayersCountKey(tournamentId)) | |
201 | + | let totalBuyInCollectedAmount = (tryGetInteger(tournamentTotalBuyInCollectedAmountKey(tournamentId)) - paidBuyInAmount) | |
202 | + | let feesTaken = fraction(totalBuyInCollectedAmount, tournamentBuyInFeePercent, 100) | |
203 | + | $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) | |
204 | + | } | |
205 | + | } | |
206 | + | ||
207 | + | ||
208 | + | ||
209 | + | @Callable(i) | |
210 | + | func signUpToTournament (tournamentId) = { | |
211 | + | let maxPlayersCount = getIntegerValue(this, tournamentMaxPlayersCountKey(tournamentId)) | |
212 | + | let alreadyRegisteredPlayersCount = tryGetInteger(tournamentPlayersCountKey(tournamentId)) | |
213 | + | let tournamentStatus = getStringValue(tournamentStatusKey(tournamentId)) | |
214 | + | if (if ((tournamentStatus != "registration")) | |
215 | + | then (tournamentStatus != "started") | |
216 | + | else false) | |
217 | + | then throw("Tournament is not in registration phase!") | |
218 | + | else if ((alreadyRegisteredPlayersCount == maxPlayersCount)) | |
219 | + | then throw("Tournament is currently full, please try again later!") | |
220 | + | else { | |
221 | + | let pmt = if ((size(i.payments) == 1)) | |
222 | + | then i.payments[0] | |
223 | + | else throw("Please attach exactly one payment") | |
224 | + | let buyInAssetid = match pmt.assetId { | |
225 | + | case b: Unit => | |
226 | + | "" | |
227 | + | case b: ByteVector => | |
228 | + | toBase58String(b) | |
229 | + | case _ => | |
230 | + | throw("Match error") | |
231 | + | } | |
232 | + | let buyInRequiredAmount = getIntegerValue(this, tournamentBuyInAmountKey(tournamentId)) | |
233 | + | let buyInRequiredAssetId = getStringValue(this, tournamentBuyInAssetIdKey(tournamentId)) | |
234 | + | if ((buyInRequiredAmount != pmt.amount)) | |
235 | + | then throw(("Attached payment amount is invalid, must be " + toString(buyInRequiredAmount))) | |
236 | + | else if ((buyInRequiredAssetId != buyInAssetid)) | |
237 | + | then throw(("Attached payment asset id is invalid, must be " + buyInRequiredAssetId)) | |
238 | + | else { | |
239 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
240 | + | let totalBuyInCollectedAmount = (tryGetInteger(tournamentTotalBuyInCollectedAmountKey(tournamentId)) + pmt.amount) | |
241 | + | let feesTaken = fraction(totalBuyInCollectedAmount, tournamentBuyInFeePercent, 100) | |
242 | + | $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) | |
243 | + | } | |
244 | + | } | |
245 | + | } | |
246 | + | ||
247 | + | ||
248 | + | ||
249 | + | @Callable(i) | |
250 | + | func cancelTournament (tournamentId) = { | |
251 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
252 | + | let tournamentCreator = getStringValue(tournamentCreatorKey(tournamentId)) | |
253 | + | let creatorCheck = if ((tournamentCreator == callerAddrStr)) | |
254 | + | then true | |
255 | + | else if ((i.caller == this)) | |
256 | + | then true | |
257 | + | else throw("Only tournament creator can cancel it!") | |
258 | + | if ((creatorCheck == creatorCheck)) | |
259 | + | then { | |
260 | + | let tournamentStatus = getStringValue(tournamentStatusKey(tournamentId)) | |
261 | + | if (if ((i.caller != this)) | |
262 | + | then (tournamentStatus != "registration") | |
263 | + | else false) | |
264 | + | then throw("Tournament is not in registration phase!") | |
265 | + | else { | |
266 | + | let alreadyRegisteredPlayersCount = tryGetInteger(tournamentPlayersCountKey(tournamentId)) | |
267 | + | if ((alreadyRegisteredPlayersCount > 0)) | |
268 | + | then throw("Cannot cancel a tournament when players are already registered to it!") | |
269 | + | else { | |
270 | + | let tournamentPrizeAmount = getIntegerValue(tournamentPrizeAmountKey(tournamentId)) | |
271 | + | let tournamentPrizeAssetId = getStringValue(tournamentPrizeAssetIdKey(tournamentId)) | |
272 | + | $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) | |
273 | + | } | |
274 | + | } | |
275 | + | } | |
276 | + | else throw("Strict value is not equal to itself.") | |
277 | + | } | |
278 | + | ||
279 | + | ||
280 | + | ||
281 | + | @Callable(i) | |
282 | + | func createTournament (tournamentId,name,playersCount,buyInAmount,buyInAssetId) = { | |
283 | + | let pmt = if ((size(i.payments) == 1)) | |
284 | + | then i.payments[0] | |
285 | + | else { | |
286 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
287 | + | if ((callerAddrStr == allowedSpecialTournamentCreator)) | |
288 | + | then AttachedPayment(unit, 0) | |
289 | + | else throw("Please attach exactly one payment") | |
290 | + | } | |
291 | + | let tournamentCreator = match getString(tournamentCreatorKey(tournamentId)) { | |
292 | + | case creator: String => | |
293 | + | throw(("Tournament already exists with this id " + tournamentId)) | |
294 | + | case _ => | |
295 | + | unit | |
296 | + | } | |
297 | + | if ((tournamentCreator == tournamentCreator)) | |
298 | + | then { | |
299 | + | let prizeAssetId = match pmt.assetId { | |
300 | + | case b: Unit => | |
301 | + | "" | |
302 | + | case b: ByteVector => | |
303 | + | toBase58String(b) | |
304 | + | case _ => | |
305 | + | throw("Match error") | |
306 | + | } | |
307 | + | let assetDetails = match pmt.assetId { | |
308 | + | case b: Unit => | |
309 | + | ["Waves", 8] | |
310 | + | case b: ByteVector => | |
311 | + | match assetInfo(b) { | |
312 | + | case asset: Asset => | |
313 | + | [asset.name, asset.decimals] | |
314 | + | case _ => | |
315 | + | throw("Can't find asset") | |
316 | + | } | |
317 | + | case _ => | |
318 | + | throw("Match error") | |
319 | + | } | |
320 | + | let buyInAsset = match assetInfo(fromBase58String(buyInAssetId)) { | |
321 | + | case asset: Asset => | |
322 | + | [asset.name, asset.decimals] | |
323 | + | case _ => | |
324 | + | ["", 0] | |
325 | + | } | |
326 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
327 | + | $Tuple2([IntegerEntry(tournamentPrizeAmountKey(tournamentId), pmt.amount), IntegerEntry(tournamentPlayersCountKey(tournamentId), 0), IntegerEntry(tournamentMaxPlayersCountKey(tournamentId), playersCount), StringEntry(tournamentPrizeAssetIdKey(tournamentId), prizeAssetId), StringEntry(tournamentPrizeAssetNameKey(tournamentId), { | |
328 | + | let @ = assetDetails[0] | |
329 | + | if ($isInstanceOf(@, "String")) | |
330 | + | then @ | |
331 | + | else throw(($getType(@) + " couldn't be cast to String")) | |
332 | + | }), IntegerEntry(tournamentPrizeAssetDecimalsKey(tournamentId), { | |
333 | + | let @ = assetDetails[1] | |
334 | + | if ($isInstanceOf(@, "Int")) | |
335 | + | then @ | |
336 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
337 | + | }), StringEntry(tournamentStatusKey(tournamentId), "registration"), IntegerEntry(tournamentBuyInAmountKey(tournamentId), buyInAmount), StringEntry(tournamentBuyInAssetNameKey(tournamentId), { | |
338 | + | let @ = buyInAsset[0] | |
339 | + | if ($isInstanceOf(@, "String")) | |
340 | + | then @ | |
341 | + | else throw(($getType(@) + " couldn't be cast to String")) | |
342 | + | }), IntegerEntry(tournamentBuyInAssetDecimalsKey(tournamentId), { | |
343 | + | let @ = buyInAsset[1] | |
344 | + | if ($isInstanceOf(@, "Int")) | |
345 | + | then @ | |
346 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
347 | + | }), StringEntry(tournamentBuyInAssetIdKey(tournamentId), buyInAssetId), StringEntry(tournamentNameKey(tournamentId), name), StringEntry(tournamentCreatorKey(tournamentId), callerAddrStr)], 1) | |
348 | + | } | |
349 | + | else throw("Strict value is not equal to itself.") | |
350 | + | } | |
351 | + | ||
352 | + | ||
353 | + | ||
354 | + | @Callable(i) | |
355 | + | func startTournament (tournamentId) = if ((i.caller != this)) | |
356 | + | then throw("Admin Only") | |
357 | + | else $Tuple2([StringEntry(tournamentStatusKey(tournamentId), "started")], 1) | |
358 | + | ||
359 | + | ||
360 | + | ||
361 | + | @Callable(i) | |
362 | + | func finishTournament (tournamentId,winningTransfertTransactionId) = if ((i.caller != this)) | |
363 | + | then throw("Admin Only") | |
364 | + | else { | |
365 | + | let tournamentCreator = getStringValue(tournamentCreatorKey(tournamentId)) | |
366 | + | let tournamentTotalBuyInAmount = tryGetInteger(tournamentTotalBuyInCollectedAmountKey(tournamentId)) | |
367 | + | let tournamentBuyInAmount = getIntegerValue(tournamentBuyInAmountKey(tournamentId)) | |
368 | + | let tournamentBuyInAssetId = match getString(tournamentBuyInAssetIdKey(tournamentId)) { | |
369 | + | case id: String => | |
370 | + | if ((id == "")) | |
371 | + | then unit | |
372 | + | else fromBase58String(id) | |
373 | + | case _ => | |
374 | + | unit | |
375 | + | } | |
376 | + | let tournamentBuyInFee = fraction(tournamentTotalBuyInAmount, tournamentBuyInFeePercent, 100) | |
377 | + | let tournamentPrizeAmount = getIntegerValue(tournamentPrizeAmountKey(tournamentId)) | |
378 | + | if ((tournamentPrizeAmount > 0)) | |
379 | + | then $Tuple2([StringEntry(tournamentWinningTransactionIdKey(tournamentId), winningTransfertTransactionId), StringEntry(tournamentStatusKey(tournamentId), "finished"), IntegerEntry(tournamentBuyInFeeCollectedKey(tournamentId), tournamentBuyInFee), ScriptTransfer(addressFromStringValue(tournamentCreator), (tournamentTotalBuyInAmount - tournamentBuyInFee), tournamentBuyInAssetId)], 1) | |
380 | + | else { | |
381 | + | let serviceFee = fraction(tournamentBuyInFee, 20, 100) | |
382 | + | $Tuple2([StringEntry(tournamentWinningTransactionIdKey(tournamentId), winningTransfertTransactionId), StringEntry(tournamentStatusKey(tournamentId), "finished"), IntegerEntry(tournamentBuyInFeeCollectedKey(tournamentId), tournamentBuyInFee), IntegerEntry(tournamentServiceFeeCollectedKey(tournamentId), serviceFee), ScriptTransfer(addressFromStringValue(tournamentCreator), (tournamentBuyInFee - serviceFee), tournamentBuyInAssetId)], 1) | |
383 | + | } | |
384 | + | } | |
385 | + | ||
386 | + | ||
387 | + | ||
388 | + | @Callable(i) | |
389 | + | func playerExitGame (gameId,playerAddr,exitStackAmount) = if ((i.caller != this)) | |
390 | + | then throw("Admin Only") | |
391 | + | else { | |
392 | + | let currentTotalLockedFunds = tryGetInteger(addressTotalLockedFundsKey(playerAddr)) | |
393 | + | let currentGameLockedAmountForPlayer = tryGetInteger(addressLockedFundsForGameKey(playerAddr, gameId)) | |
394 | + | $Tuple2([IntegerEntry(addressTotalLockedFundsKey(playerAddr), (currentTotalLockedFunds - currentGameLockedAmountForPlayer)), IntegerEntry(addressLockedFundsForGameKey(playerAddr, gameId), 0), ScriptTransfer(addressFromStringValue(playerAddr), exitStackAmount, fromBase58String(depositAssetId))], 1) | |
395 | + | } | |
396 | + | ||
397 | + | ||
398 | + | ||
399 | + | @Callable(i) | |
400 | + | func lockFundsForGame (gameId) = { | |
401 | + | let pmt = if ((size(i.payments) == 1)) | |
402 | + | then i.payments[0] | |
403 | + | else throw("Please attach exactly one payment") | |
404 | + | if ((pmt.assetId != fromBase58String(depositAssetId))) | |
405 | + | then throw("You can only deposit USDN") | |
406 | + | else { | |
407 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
408 | + | let currentTotalLockedFunds = tryGetInteger(addressTotalLockedFundsKey(callerAddrStr)) | |
409 | + | let currentLockedFundsTotalHistory = tryGetInteger(addressLockedFundsTotalHistoryKey(callerAddrStr)) | |
410 | + | $Tuple2([IntegerEntry(addressTotalLockedFundsKey(callerAddrStr), (currentTotalLockedFunds + pmt.amount)), IntegerEntry(addressLockedFundsTotalHistoryKey(callerAddrStr), (currentLockedFundsTotalHistory + pmt.amount)), IntegerEntry(addressLockedFundsForGameKey(callerAddrStr, gameId), pmt.amount)], 1) | |
411 | + | } | |
412 | + | } | |
413 | + | ||
414 | + | ||
415 | + | ||
416 | + | @Callable(i) | |
417 | + | func betOnVideoPokerGame (gameId) = { | |
418 | + | let pmt = if ((size(i.payments) == 1)) | |
419 | + | then i.payments[0] | |
420 | + | else throw("Please attach exactly one payment") | |
421 | + | if ((pmt.assetId != fromBase58String(depositAssetId))) | |
422 | + | then throw("You can only deposit USDN") | |
423 | + | else { | |
424 | + | let callerAddrStr = toBase58String(i.caller.bytes) | |
425 | + | $Tuple2([IntegerEntry(videoPokerBetForAccount(gameId, callerAddrStr), pmt.amount), StringEntry(videoPokerPlayerAddressKey(gameId), callerAddrStr), StringEntry(videoPokerStatusKey(gameId), "created")], 1) | |
426 | + | } | |
427 | + | } | |
428 | + | ||
429 | + | ||
430 | + | ||
431 | + | @Callable(i) | |
432 | + | func finishVideoPokerGame (gameId,result,cardsDrawn) = if ((i.caller != this)) | |
433 | + | then throw("Admin Only") | |
434 | + | else { | |
435 | + | let playerAddr = getStringValue(videoPokerPlayerAddressKey(gameId)) | |
436 | + | let betAmount = getIntegerValue(videoPokerBetForAccount(gameId, playerAddr)) | |
437 | + | let currentGameStatus = getStringValue(videoPokerStatusKey(gameId)) | |
438 | + | let checkStatus = if ((currentGameStatus == "created")) | |
439 | + | then true | |
440 | + | else throw("Game is not in the correct status!") | |
441 | + | if ((checkStatus == checkStatus)) | |
442 | + | then { | |
443 | + | let betMultiplier = if ((result == "Pair, J's")) | |
444 | + | then 1 | |
445 | + | else if ((result == "Pair, Q's")) | |
446 | + | then 1 | |
447 | + | else if ((result == "Pair, K's")) | |
448 | + | then 1 | |
449 | + | else if ((result == "Pair, A's")) | |
450 | + | then 1 | |
451 | + | else if ((result == "Two Pair")) | |
452 | + | then 2 | |
453 | + | else if ((result == "Three of a Kind")) | |
454 | + | then 3 | |
455 | + | else if ((result == "Straight")) | |
456 | + | then 4 | |
457 | + | else if ((result == "Flush")) | |
458 | + | then 6 | |
459 | + | else if ((result == "Full House")) | |
460 | + | then 9 | |
461 | + | else if ((result == "Four of a Kind")) | |
462 | + | then 25 | |
463 | + | else if ((result == "Straight Flush")) | |
464 | + | then 50 | |
465 | + | else if ((result == "Royal Flush")) | |
466 | + | then 800 | |
467 | + | else 0 | |
468 | + | if ((betMultiplier == betMultiplier)) | |
469 | + | then { | |
470 | + | let amountWon = (betAmount * betMultiplier) | |
471 | + | $Tuple2([StringEntry(videoPokerCardsDrawnKey(gameId), cardsDrawn), StringEntry(videoPokerResultKey(gameId), result), IntegerEntry(videoPokerResultProfitKey(gameId), amountWon), StringEntry(videoPokerStatusKey(gameId), "finished"), ScriptTransfer(addressFromStringValue(playerAddr), amountWon, fromBase58String(depositAssetId))], 1) | |
472 | + | } | |
473 | + | else throw("Strict value is not equal to itself.") | |
474 | + | } | |
475 | + | else throw("Strict value is not equal to itself.") | |
476 | + | } | |
477 | + | ||
478 | + | ||
479 | + | @Verifier(tx) | |
480 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
481 | + |
github/deemru/w8io/026f985 55.70 ms ◑