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