tx · Db6nfE21hSc12hp2zU56LMVpDd1xjWCE8p3RNLev6a9e

3MzeHbBRT3dUcDXPLb9UhhjFVwf9zpZPEdw:  -0.01600000 Waves

2022.10.08 02:23 [2262557] smart account 3MzeHbBRT3dUcDXPLb9UhhjFVwf9zpZPEdw > SELF 0.00000000 Waves

{ "type": 13, "id": "Db6nfE21hSc12hp2zU56LMVpDd1xjWCE8p3RNLev6a9e", "fee": 1600000, "feeAssetId": null, "timestamp": 1665185003605, "version": 2, "chainId": 84, "sender": "3MzeHbBRT3dUcDXPLb9UhhjFVwf9zpZPEdw", "senderPublicKey": "D4ayQLMVk76AuekMVbMVEEFDyZerM8Mnn3kreb1WtQzT", "proofs": [ "4wu8vhNrK28zKyAZCBjr1QR81ZHJmk2i7idhqY9G9Z66ppscYXZ4edduyPh9arbeakGYgbNQxF8KNrQvuZthUAp6" ], "script": "base64:BgJACAISAwoBCBIAEgMKAQgSAwoBCBIDCgEIEgcKBQgIAQEIEgQKAggIEgUKAwgIARIDCgEIEgASBQoDCAgIEgASACUABXdhdmVzAIDC1y8ADnRpY2tldFByaWNlSW50AMCEPQALdGlja2V0UHJpY2UFDnRpY2tldFByaWNlSW50AAZpbnZGZWUAoMIeABJ3aXRoZHJhd0ZlZVBlcmNlbnQABQAWZmVlQ29sbGVjdG9yQWRkcmVzc0tleQITZmVlQ29sbGVjdG9yQWRkcmVzcwAZdG91cm5hbWVudEJ1eUluRmVlUGVyY2VudAAKAA5kZXBvc2l0QXNzZXRJZAIsNXVlMWZpdVY2ajZVQnI2WGYyOFFtczZ5NUZxekt0cXZheHhod3U3aFRRNTgBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABEmdldFRpY2tldHNDb3VudEtleQENYWRkcmVzc1N0cmluZwkArAICBQ1hZGRyZXNzU3RyaW5nAg1fdGlja2V0c0NvdW50ASJidXlJbkFtb3VudEZvclRvdXJuYW1lbnRGb3JBY2NvdW50Agx0b3VybmFtZW50SWQHYWNjb3VudAkArAICCQCsAgIFDHRvdXJuYW1lbnRJZAIXX2J1eUluQW1vdW50Rm9yQWNjb3VudF8FB2FjY291bnQBI2J1eUluQXNzZXRJZEZvclRvdXJuYW1lbnRGb3JBY2NvdW50Agx0b3VybmFtZW50SWQHYWNjb3VudAkArAICCQCsAgIFDHRvdXJuYW1lbnRJZAIYX2J1eUluQXNzZXRJZEZvckFjY291bnRfBQdhY2NvdW50AR10aWNrZXRGb3JUb3VybmFtZW50Rm9yQWNjb3VudAIMdG91cm5hbWVudElkB2FjY291bnQJAKwCAgkArAICBQx0b3VybmFtZW50SWQCEl90aWNrZXRGb3JBY2NvdW50XwUHYWNjb3VudAEmdG91cm5hbWVudFRvdGFsQnV5SW5Db2xsZWN0ZWRBbW91bnRLZXkBDHRvdXJuYW1lbnRJZAkArAICBQx0b3VybmFtZW50SWQCJF90b3VybmFtZW50VG90YWxCdXlJbkNvbGxlY3RlZEFtb3VudAEUdG91cm5hbWVudENyZWF0b3JLZXkBDHRvdXJuYW1lbnRJZAkArAICBQx0b3VybmFtZW50SWQCEl90b3VybmFtZW50Q3JlYXRvcgERdG91cm5hbWVudE5hbWVLZXkBDHRvdXJuYW1lbnRJZAkArAICBQx0b3VybmFtZW50SWQCD190b3VybmFtZW50TmFtZQEYdG91cm5hbWVudFByaXplQW1vdW50S2V5AQx0b3VybmFtZW50SWQJAKwCAgUMdG91cm5hbWVudElkAhZfdG91cm5hbWVudFByaXplQW1vdW50ARx0b3VybmFtZW50TWF4UGxheWVyc0NvdW50S2V5AQx0b3VybmFtZW50SWQJAKwCAgUMdG91cm5hbWVudElkAhpfdG91cm5hbWVudE1heFBsYXllcnNDb3VudAEZdG91cm5hbWVudFBsYXllcnNDb3VudEtleQEMdG91cm5hbWVudElkCQCsAgIFDHRvdXJuYW1lbnRJZAIXX3RvdXJuYW1lbnRQbGF5ZXJzQ291bnQBGXRvd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wbXQHYXNzZXRJZAkAAgECJ1RpY2tldHMgY2FuIG9ubHkgaWJlIHB1cmNoYXNlZCBpbiBXYXZlcwMJAQIhPQIIBQNwbXQGYW1vdW50BQt0aWNrZXRQcmljZQkAAgEJAKwCAgkArAICAh9UaGUgcGF5bWVudCBtdXN0IGJlIG9mIGV4YWN0bHkgCQCkAwEFDnRpY2tldFByaWNlSW50AgYgd2F2ZXMEDWNhbGxlckFkZHJTdHIJANgEAQgIBQFpBmNhbGxlcgVieXRlcwQTY3VycmVudFRpY2tldHNDb3VudAkBDXRyeUdldEludGVnZXIBCQESZ2V0VGlja2V0c0NvdW50S2V5AQUNY2FsbGVyQWRkclN0cgkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQESZ2V0VGlja2V0c0NvdW50S2V5AQUNY2FsbGVyQWRkclN0cgkAZAIFE2N1cnJlbnRUaWNrZXRzQ291bnQAAQUDbmlsAAEBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5l0hiBA==", "height": 2262557, "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+ let creatorCheck = if ((tournamentCreator == callerAddrStr))
200+ then true
201+ else if ((i.caller == this))
202+ then true
203+ else throw("Only tournament creator can cancel it!")
204+ if ((creatorCheck == creatorCheck))
205+ then {
206+ let tournamentStatus = getStringValue(tournamentStatusKey(tournamentId))
207+ if ((tournamentStatus != "registration"))
208+ then throw("Tournament is not in registration phase!")
209+ else {
210+ let alreadyRegisteredPlayersCount = tryGetInteger(tournamentPlayersCountKey(tournamentId))
211+ if ((alreadyRegisteredPlayersCount > 0))
212+ then throw("Cannot cancel a tournament when players are already registered to it!")
213+ else {
214+ let tournamentPrizeAmount = getIntegerValue(tournamentPrizeAmountKey(tournamentId))
215+ let tournamentPrizeAssetId = getStringValue(tournamentPrizeAssetIdKey(tournamentId))
216+ $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)
217+ }
218+ }
219+ }
220+ else throw("Strict value is not equal to itself.")
221+ }
222+
223+
224+
225+@Callable(i)
226+func createTournament (tournamentId,name,playersCount,buyInAmount,buyInAssetId) = {
227+ let pmt = if ((size(i.payments) == 1))
228+ then i.payments[0]
229+ else throw("Please attach exactly one payment")
230+ let tournamentCreator = match getString(tournamentCreatorKey(tournamentId)) {
231+ case creator: String =>
232+ throw(("Tournament already exists with this id " + tournamentId))
233+ case _ =>
234+ unit
235+ }
236+ if ((tournamentCreator == tournamentCreator))
237+ then {
238+ let prizeAssetId = match pmt.assetId {
239+ case b: Unit =>
240+ ""
241+ case b: ByteVector =>
242+ toBase58String(b)
243+ case _ =>
244+ throw("Match error")
245+ }
246+ let assetDetails = match pmt.assetId {
247+ case b: Unit =>
248+["Waves", 8]
249+ case b: ByteVector =>
250+ match assetInfo(b) {
251+ case asset: Asset =>
252+[asset.name, asset.decimals]
253+ case _ =>
254+ throw("Can't find asset")
255+ }
256+ case _ =>
257+ throw("Match error")
258+ }
259+ let buyInAsset = match assetInfo(fromBase58String(buyInAssetId)) {
260+ case asset: Asset =>
261+[asset.name, asset.decimals]
262+ case _ =>
263+["", 0]
264+ }
265+ let callerAddrStr = toBase58String(i.caller.bytes)
266+ $Tuple2([IntegerEntry(tournamentPrizeAmountKey(tournamentId), pmt.amount), IntegerEntry(tournamentPlayersCountKey(tournamentId), 0), IntegerEntry(tournamentMaxPlayersCountKey(tournamentId), playersCount), StringEntry(tournamentPrizeAssetIdKey(tournamentId), prizeAssetId), StringEntry(tournamentPrizeAssetNameKey(tournamentId), {
267+ let @ = assetDetails[0]
268+ if ($isInstanceOf(@, "String"))
269+ then @
270+ else throw(($getType(@) + " couldn't be cast to String"))
271+ }), IntegerEntry(tournamentPrizeAssetDecimalsKey(tournamentId), {
272+ let @ = assetDetails[1]
273+ if ($isInstanceOf(@, "Int"))
274+ then @
275+ else throw(($getType(@) + " couldn't be cast to Int"))
276+ }), StringEntry(tournamentStatusKey(tournamentId), "registration"), IntegerEntry(tournamentBuyInAmountKey(tournamentId), buyInAmount), StringEntry(tournamentBuyInAssetNameKey(tournamentId), {
277+ let @ = buyInAsset[0]
278+ if ($isInstanceOf(@, "String"))
279+ then @
280+ else throw(($getType(@) + " couldn't be cast to String"))
281+ }), IntegerEntry(tournamentBuyInAssetDecimalsKey(tournamentId), {
282+ let @ = buyInAsset[1]
283+ if ($isInstanceOf(@, "Int"))
284+ then @
285+ else throw(($getType(@) + " couldn't be cast to Int"))
286+ }), StringEntry(tournamentBuyInAssetIdKey(tournamentId), buyInAssetId), StringEntry(tournamentNameKey(tournamentId), name), StringEntry(tournamentCreatorKey(tournamentId), callerAddrStr)], 1)
287+ }
288+ else throw("Strict value is not equal to itself.")
289+ }
290+
291+
292+
293+@Callable(i)
294+func finishTournament (tournamentId,winningTransfertTransactionId) = if ((i.caller != this))
295+ then throw("Admin Only")
296+ else {
297+ let tournamentCreator = getStringValue(tournamentCreatorKey(tournamentId))
298+ let tournamentTotalBuyInAmount = tryGetInteger(tournamentTotalBuyInCollectedAmountKey(tournamentId))
299+ let tournamentBuyInAmount = getIntegerValue(tournamentBuyInAmountKey(tournamentId))
300+ let tournamentBuyInAssetId = match getString(tournamentBuyInAssetIdKey(tournamentId)) {
301+ case id: String =>
302+ if ((id == ""))
303+ then unit
304+ else fromBase58String(id)
305+ case _ =>
306+ unit
307+ }
308+ let tournamentBuyInFee = fraction(tournamentTotalBuyInAmount, tournamentBuyInFeePercent, 100)
309+ $Tuple2([StringEntry(tournamentWinningTransactionIdKey(tournamentId), winningTransfertTransactionId), StringEntry(tournamentStatusKey(tournamentId), "finished"), IntegerEntry(tournamentBuyInFeeCollectedKey(tournamentId), tournamentBuyInFee), ScriptTransfer(addressFromStringValue(tournamentCreator), (tournamentTotalBuyInAmount - tournamentBuyInFee), tournamentBuyInAssetId)], 1)
310+ }
311+
312+
313+
314+@Callable(i)
315+func playerExitGame (gameId,playerAddr,exitStackAmount) = if ((i.caller != this))
316+ then throw("Admin Only")
317+ else {
318+ let currentTotalLockedFunds = tryGetInteger(addressTotalLockedFundsKey(playerAddr))
319+ let currentGameLockedAmountForPlayer = tryGetInteger(addressLockedFundsForGameKey(playerAddr, gameId))
320+ $Tuple2([IntegerEntry(addressTotalLockedFundsKey(playerAddr), (currentTotalLockedFunds - currentGameLockedAmountForPlayer)), IntegerEntry(addressLockedFundsForGameKey(playerAddr, gameId), 0), ScriptTransfer(addressFromStringValue(playerAddr), exitStackAmount, fromBase58String(depositAssetId))], 1)
321+ }
322+
323+
324+
325+@Callable(i)
326+func lockFundsForGame (gameId) = {
327+ let pmt = if ((size(i.payments) == 1))
328+ then i.payments[0]
329+ else throw("Please attach exactly one payment")
330+ if ((pmt.assetId != fromBase58String(depositAssetId)))
331+ then throw("You can only deposit USDN")
332+ else {
333+ let callerAddrStr = toBase58String(i.caller.bytes)
334+ let currentTotalLockedFunds = tryGetInteger(addressTotalLockedFundsKey(callerAddrStr))
335+ let currentLockedFundsTotalHistory = tryGetInteger(addressLockedFundsTotalHistoryKey(callerAddrStr))
336+ $Tuple2([IntegerEntry(addressTotalLockedFundsKey(callerAddrStr), (currentTotalLockedFunds + pmt.amount)), IntegerEntry(addressLockedFundsTotalHistoryKey(callerAddrStr), (currentLockedFundsTotalHistory + pmt.amount)), IntegerEntry(addressLockedFundsForGameKey(callerAddrStr, gameId), pmt.amount)], 1)
337+ }
338+ }
339+
340+
341+
342+@Callable(i)
343+func withdrawFunds () = {
344+ let callerAddrStr = toBase58String(i.caller.bytes)
345+ let feeCollectorAddr = addressFromStringValue(getStringValue(feeCollectorAddressKey))
346+ let currentAvailableFunds = tryGetInteger(addressAvailableFundsKey(callerAddrStr))
347+ let withdrawFee = fraction(currentAvailableFunds, withdrawFeePercent, 100)
348+ let actualAvailableFunds = (currentAvailableFunds - withdrawFee)
349+ if ((0 >= actualAvailableFunds))
350+ then throw("No available funds to withdraw")
351+ else [IntegerEntry(addressAvailableFundsKey(callerAddrStr), 0), ScriptTransfer(i.caller, actualAvailableFunds, fromBase58String(depositAssetId)), ScriptTransfer(feeCollectorAddr, withdrawFee, fromBase58String(depositAssetId))]
352+ }
353+
354+
355+
356+@Callable(i)
357+func setWinnerHeadsUp (gameId,winnerAddrStr,otherPlayerAddr) = if ((i.caller != this))
358+ then throw("Admin Only")
359+ else {
360+ let availableRewardsKey = addressAvailableRewardsKey(winnerAddrStr)
361+ let currentAvailableRewards = tryGetInteger(availableRewardsKey)
362+ let newTicketCountWinner = consumeTicket(winnerAddrStr)
363+ let newTicketCountOtherPlayer = consumeTicket(otherPlayerAddr)
364+[StringEntry(gameWinnerKey(gameId), winnerAddrStr), IntegerEntry(availableRewardsKey, (currentAvailableRewards + (ticketPrice * 2))), IntegerEntry(getTicketsCountKey(winnerAddrStr), newTicketCountWinner), IntegerEntry(getTicketsCountKey(otherPlayerAddr), newTicketCountOtherPlayer)]
365+ }
366+
367+
368+
369+@Callable(i)
370+func withdrawRewards () = {
371+ let callerAddrStr = toBase58String(i.caller.bytes)
372+ let feeCollectorAddr = addressFromStringValue(getStringValue(feeCollectorAddressKey))
373+ let currentAvailableRewards = tryGetInteger(addressAvailableRewardsKey(callerAddrStr))
374+ let withdrawFee = fraction(currentAvailableRewards, withdrawFeePercent, 100)
375+ let actualAvailableRewards = ((currentAvailableRewards - invFee) - withdrawFee)
376+ if ((0 >= currentAvailableRewards))
377+ then throw("No available rewards to withdraw")
378+ else [IntegerEntry(addressAvailableRewardsKey(callerAddrStr), 0), ScriptTransfer(i.caller, actualAvailableRewards, unit), ScriptTransfer(feeCollectorAddr, withdrawFee, unit)]
379+ }
380+
381+
382+
383+@Callable(i)
384+func buyTickets () = {
385+ let pmt = if ((size(i.payments) == 1))
386+ then i.payments[0]
387+ else throw("Please attach exactly one payment")
388+ if (isDefined(pmt.assetId))
389+ then throw("Tickets can only ibe purchased in Waves")
390+ else if ((pmt.amount != ticketPrice))
391+ then throw((("The payment must be of exactly " + toString(ticketPriceInt)) + " waves"))
392+ else {
393+ let callerAddrStr = toBase58String(i.caller.bytes)
394+ let currentTicketsCount = tryGetInteger(getTicketsCountKey(callerAddrStr))
395+ $Tuple2([IntegerEntry(getTicketsCountKey(callerAddrStr), (currentTicketsCount + 1))], 1)
396+ }
397+ }
398+
399+
400+@Verifier(tx)
401+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
402+

github/deemru/w8io/026f985 
36.09 ms