tx · 2ZX2ybi18RkDCVgM5nR2bGHaLuVtCiYjQB7wq3Qgx453

3Mv2Qz2zAw9hvP9QVnGHA7e162XrMxbPhCV:  -0.01700000 Waves

2022.10.12 23:47 [2269631] smart account 3Mv2Qz2zAw9hvP9QVnGHA7e162XrMxbPhCV > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
36.32 ms