tx · 441LkjSVncr3gnActXrmyBJqCp7UmEqn7q6nwwxYE4Nn

3MypujNYx2TgM6yLJmvKGAZaSeeKxsEDmwi:  -0.01500000 Waves

2022.09.30 01:02 [2250975] smart account 3MypujNYx2TgM6yLJmvKGAZaSeeKxsEDmwi > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
42.19 ms