tx · 4DfVrtRazha6LoWJ495MiJGKiGRng4EmGgvm4GCDHFdZ

3NBePY9oKdZMWB4gNyJaBRovFYqf3Bf1V21:  -0.01500000 Waves

2022.09.30 02:36 [2251064] smart account 3NBePY9oKdZMWB4gNyJaBRovFYqf3Bf1V21 > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
46.85 ms