tx · a9WDsvvtRGtMyGwqxUymkougA2zvG4wg29as56HLzu4 3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8: -0.01300000 Waves 2022.11.10 20:14 [2311339] smart account 3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8 > SELF 0.00000000 Waves
{ "type": 13, "id": "a9WDsvvtRGtMyGwqxUymkougA2zvG4wg29as56HLzu4", "fee": 1300000, "feeAssetId": null, "timestamp": 1668100444436, "version": 2, "chainId": 84, "sender": "3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8", "senderPublicKey": "6L7iBerXuPa5E74WCM6fLSB2VM1bMG9jgASH8tu9orHN", "proofs": [ "v6ZABN7Ftme5utetpwRpo9JJ6yVoyPKcLVEAeQ5Ta1u1qEWWQpMwuCqzGJceLCeFMGCLJo4PfbCGG6rMr4yhwoc" ], "script": "base64:BgIoCAISBwoFAQgBAQgSBgoEAQEICBIDCgEBEgQKAgEIEgQKAhEYEgASACoAD0dBTUVfVFlQRV9HUk9VUAIFR3JvdXAAEUdBTUVfVFlQRV9QTEFUT0ZGAghQbGF5LW9mZgAKR0FNRV9UWVBFUwkAzAgCBQ9HQU1FX1RZUEVfR1JPVVAJAMwIAgURR0FNRV9UWVBFX1BMQVRPRkYFA25pbAAEVVNEVAEgbySjyqsw3FIpmOgsYVruWn8jTcItdbvpnapU4NLQB8EAB01JTl9CRVQAwIQ9AAhPTkVfSE9VUgkAaAIJAGgCAAUAPADoBwARTU9ORVlfQk9YX0FERFJFRVMJAQdBZGRyZXNzAQEaAVSxYgy7BRV2F+zuKtUZtXyHmoiep9yqU84AB0JFVF9GRUUA9AMACUZFRV9TQ0FMRQCQTgAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UADWtHYW1lU3RyYVRpbWUCDl9zdGFydEdhbWVUaW1lAAlrR2FtZVR5cGUCCV9HYW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"applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ey56cvi11nPBonVsYTRiLmC35Bh3KVLMTgfSFDqNV57h Next: 3dwwLKhoSMJmjsXhKrPU93xySYpTPEh79PBm6b1PJTkH Diff:
Old | New | Differences | |
---|---|---|---|
171 | 171 | let G1 = (valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 1, winner)), 0) + (if ((type == 1)) | |
172 | 172 | then amount | |
173 | 173 | else 0)) | |
174 | - | let G2 = (valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 2, | |
174 | + | let G2 = (valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 2, gameResult)), 0) + (if ((type == 2)) | |
175 | 175 | then amount | |
176 | 176 | else 0)) | |
177 | 177 | let G3 = (valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 3, ((winner + "_") + toString(diff)))), 0) + (if ((type == 3)) | |
178 | 178 | then amount | |
179 | 179 | else 0)) | |
180 | 180 | let totalWinValue = ((G1 + G2) + G3) | |
181 | - | let totalBets = valueOrElse(getInteger(this, (toString(gameId) + kTotalBets)), 0) | |
181 | + | let totalBets = (valueOrElse(getInteger(this, (toString(gameId) + kTotalBets)), 0) + amount) | |
182 | 182 | let bankWithFee = (totalBets - totalWinValue) | |
183 | 183 | let fee = fraction(bankWithFee, BET_FEE, FEE_SCALE) | |
184 | 184 | let B = (bankWithFee - fee) | |
197 | 197 | else (((G1 + ((G1 / totalWinValueMax) * B)) * UB1) / G1) | |
198 | 198 | let D2 = if ((G2 == 0)) | |
199 | 199 | then 0 | |
200 | - | else (((G2 + ((G2 / totalWinValueMax) * B)) * UB2) / G2) | |
200 | + | else (((G2 + (((G2 * 3) / totalWinValueMax) * B)) * UB2) / G2) | |
201 | 201 | let D3 = if ((G3 == 0)) | |
202 | 202 | then 0 | |
203 | - | else (((G3 + ((G3 / totalWinValueMax) * B)) * UB3) / G3) | |
203 | + | else (((G3 + (((G3 * 2) / totalWinValueMax) * B)) * UB3) / G3) | |
204 | 204 | let claimAmount = ((D1 + D2) + D3) | |
205 | 205 | $Tuple2(nil, claimAmount) | |
206 | 206 | } | |
211 | 211 | func bet (gameId,type,result,refId) = valueOrElse(isActive(), { | |
212 | 212 | let user = toString(i.caller) | |
213 | 213 | let gIdStr = toString(gameId) | |
214 | - | let $ | |
215 | - | let pmtAmount = $ | |
216 | - | let pmtAssetId = $ | |
214 | + | let $t061246199 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
215 | + | let pmtAmount = $t061246199._1 | |
216 | + | let pmtAssetId = $t061246199._2 | |
217 | 217 | let gameStartTime = valueOrElse(getInteger(this, (toString(gameId) + kGameStraTime)), 0) | |
218 | 218 | let gameType = getStringValue(this, (toString(gameId) + kGameType)) | |
219 | 219 | if ((pmtAssetId != USDT)) | |
307 | 307 | else (((G1 + ((G1 / totalWinValueMax) * B)) * UB1) / G1) | |
308 | 308 | let D2 = if ((G2 == 0)) | |
309 | 309 | then 0 | |
310 | - | else (((G2 + ((G2 / totalWinValueMax) * B)) * UB2) / G2) | |
310 | + | else (((G2 + (((G2 * 3) / totalWinValueMax) * B)) * UB2) / G2) | |
311 | 311 | let D3 = if ((G3 == 0)) | |
312 | 312 | then 0 | |
313 | - | else (((G3 + ((G3 / totalWinValueMax) * B)) * UB3) / G3) | |
313 | + | else (((G3 + (((G3 * 2) / totalWinValueMax) * B)) * UB3) / G3) | |
314 | 314 | let claimAmount = ((D1 + D2) + D3) | |
315 | 315 | if ((claimAmount == 0)) | |
316 | 316 | then throw("Nothing to claim") | |
344 | 344 | let totalWinValue = ((totalWinType1 + totalWinType2) + totalWinType3) | |
345 | 345 | let totalBets = valueOrElse(getInteger(this, (toString(gameId) + kTotalBets)), 0) | |
346 | 346 | let bankWithFee = (totalBets - totalWinValue) | |
347 | - | let $ | |
347 | + | let $t01151811676 = if ((totalWinValue == 0)) | |
348 | 348 | then $Tuple2(bankWithFee, 0) | |
349 | 349 | else { | |
350 | 350 | let f = fraction(bankWithFee, BET_FEE, FEE_SCALE) | |
351 | 351 | $Tuple2(f, (bankWithFee - f)) | |
352 | 352 | } | |
353 | - | let fee = $ | |
354 | - | let bank = $ | |
353 | + | let fee = $t01151811676._1 | |
354 | + | let bank = $t01151811676._2 | |
355 | 355 | [StringEntry((gIdStr + kGameResult), result), IntegerEntry((gIdStr + kBank), bank), IntegerEntry((gIdStr + kFinalTime), lastBlock.timestamp), ScriptTransfer(MONEY_BOX_ADDREES, fee, USDT)] | |
356 | 356 | } | |
357 | 357 | } | |
361 | 361 | @Callable(i) | |
362 | 362 | func initGames (startGameTimes,types) = { | |
363 | 363 | func initGame (acc,startGameTime) = { | |
364 | - | let $ | |
365 | - | let entries = $ | |
366 | - | let lastGameId = $ | |
367 | - | let j = $ | |
364 | + | let $t01206012094 = acc | |
365 | + | let entries = $t01206012094._1 | |
366 | + | let lastGameId = $t01206012094._2 | |
367 | + | let j = $t01206012094._3 | |
368 | 368 | let newGameId = (lastGameId + 1) | |
369 | 369 | if ((lastBlock.timestamp > startGameTime)) | |
370 | 370 | then throw("startGameTime must be in the future") | |
377 | 377 | } | |
378 | 378 | ||
379 | 379 | let lastGameId = valueOrElse(getInteger(this, kLastGameId), 0) | |
380 | - | let $ | |
380 | + | let $t01263712722 = { | |
381 | 381 | let $l = startGameTimes | |
382 | 382 | let $s = size($l) | |
383 | 383 | let $acc0 = $Tuple3(nil, lastGameId, 0) | |
391 | 391 | ||
392 | 392 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
393 | 393 | } | |
394 | - | let gamesEntries = $ | |
395 | - | let newLGId = $ | |
394 | + | let gamesEntries = $t01263712722._1 | |
395 | + | let newLGId = $t01263712722._2 | |
396 | 396 | (gamesEntries :+ IntegerEntry(kLastGameId, newLGId)) | |
397 | 397 | } | |
398 | 398 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let GAME_TYPE_GROUP = "Group" | |
5 | 5 | ||
6 | 6 | let GAME_TYPE_PLATOFF = "Play-off" | |
7 | 7 | ||
8 | 8 | let GAME_TYPES = [GAME_TYPE_GROUP, GAME_TYPE_PLATOFF] | |
9 | 9 | ||
10 | 10 | let USDT = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
11 | 11 | ||
12 | 12 | let MIN_BET = 1000000 | |
13 | 13 | ||
14 | 14 | let ONE_HOUR = ((5 * 60) * 1000) | |
15 | 15 | ||
16 | 16 | let MONEY_BOX_ADDREES = Address(base58'3N65zqVKchaFdW4gS7FxCRibjfkVgJvo7PT') | |
17 | 17 | ||
18 | 18 | let BET_FEE = 500 | |
19 | 19 | ||
20 | 20 | let FEE_SCALE = 10000 | |
21 | 21 | ||
22 | 22 | let kActive = "active" | |
23 | 23 | ||
24 | 24 | let kActiveGlob = "active_all_contracts" | |
25 | 25 | ||
26 | 26 | let kCause = "shutdown_cause" | |
27 | 27 | ||
28 | 28 | let kGameStraTime = "_startGameTime" | |
29 | 29 | ||
30 | 30 | let kGameType = "_GameType" | |
31 | 31 | ||
32 | 32 | let kLastGameId = "last_game_id" | |
33 | 33 | ||
34 | 34 | let kTotalBets = "_totalBets" | |
35 | 35 | ||
36 | 36 | let kToWinA = "_toWinA" | |
37 | 37 | ||
38 | 38 | let kToWinB = "_toWinB" | |
39 | 39 | ||
40 | 40 | let kOnDraw = "_onDraw" | |
41 | 41 | ||
42 | 42 | let kGameResult = "_result" | |
43 | 43 | ||
44 | 44 | let kBank = "_bank" | |
45 | 45 | ||
46 | 46 | let kFinalTime = "_finalTimeā" | |
47 | 47 | ||
48 | 48 | let kTotalBetsForType = "_totalBetsForType" | |
49 | 49 | ||
50 | 50 | let kUserBet = "_userBet" | |
51 | 51 | ||
52 | 52 | let kUserRefId = "_refId" | |
53 | 53 | ||
54 | 54 | let kUserClaimed = "_claimed" | |
55 | 55 | ||
56 | 56 | let kAdminPubKey1 = "admin_pub_1" | |
57 | 57 | ||
58 | 58 | let kAdminPubKey2 = "admin_pub_2" | |
59 | 59 | ||
60 | 60 | let kAdminPubKey3 = "admin_pub_3" | |
61 | 61 | ||
62 | 62 | let oracle = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom') | |
63 | 63 | ||
64 | 64 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
65 | 65 | case string: String => | |
66 | 66 | fromBase58String(string) | |
67 | 67 | case nothing => | |
68 | 68 | throw((key + "is empty")) | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
73 | 73 | ||
74 | 74 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
75 | 75 | ||
76 | 76 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
77 | 77 | ||
78 | 78 | let active = valueOrElse(getBoolean(this, kActive), true) | |
79 | 79 | ||
80 | 80 | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
81 | 81 | ||
82 | 82 | func isActive () = if (if (active) | |
83 | 83 | then activeGlob | |
84 | 84 | else false) | |
85 | 85 | then unit | |
86 | 86 | else throw("DApp is inactive at this moment") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
90 | 90 | then unit | |
91 | 91 | else throw("Only admin can call this function") | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getUserBetKey (user,gameId,type,result) = (((((((user + "_") + toString(gameId)) + "_") + toString(type)) + "_") + result) + kUserBet) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getTotalBetsForTypeKey (gameId,type,result) = (((((toString(gameId) + "_") + toString(type)) + "_") + result) + kTotalBetsForType) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func validateBet (gameType,type,result) = if ((type == 1)) | |
104 | 104 | then if ((size(result) != 1)) | |
105 | 105 | then throw("Game result must contain only one letter: A,B,D") | |
106 | 106 | else if (!(contains("ABD", result))) | |
107 | 107 | then throw("Game result must contain only one letter: A,B,D") | |
108 | 108 | else if (if ((gameType == GAME_TYPE_PLATOFF)) | |
109 | 109 | then !(contains("AB", result)) | |
110 | 110 | else false) | |
111 | 111 | then throw("Game result must contain only one letter: A,B") | |
112 | 112 | else true | |
113 | 113 | else if ((type == 2)) | |
114 | 114 | then { | |
115 | 115 | let splited = split(result, "_") | |
116 | 116 | if ((size(splited) != 2)) | |
117 | 117 | then throw("Inncorrect game result") | |
118 | 118 | else { | |
119 | 119 | let ballsA = valueOrErrorMessage(parseInt(splited[0]), "Inncorrect game result") | |
120 | 120 | let ballsB = valueOrErrorMessage(parseInt(splited[1]), "Inncorrect game result") | |
121 | 121 | if ((ballsA == ballsB)) | |
122 | 122 | then throw("Inncorrect game result. A and B cannot be equal") | |
123 | 123 | else true | |
124 | 124 | } | |
125 | 125 | } | |
126 | 126 | else if ((type == 3)) | |
127 | 127 | then { | |
128 | 128 | let splited = split(result, "_") | |
129 | 129 | if ((size(splited) != 2)) | |
130 | 130 | then throw("Inncorrect game result") | |
131 | 131 | else { | |
132 | 132 | let team = splited[0] | |
133 | 133 | let ballsAmount = valueOrErrorMessage(parseInt(splited[1]), "Inncorrect game result") | |
134 | 134 | if ((0 >= ballsAmount)) | |
135 | 135 | then throw("Inncorrect game result, balls amount must be greater then 0") | |
136 | 136 | else if (if ((size(team) != 1)) | |
137 | 137 | then true | |
138 | 138 | else !(contains("AB", team))) | |
139 | 139 | then throw("Game result must contain only one letter: A,B") | |
140 | 140 | else true | |
141 | 141 | } | |
142 | 142 | } | |
143 | 143 | else false | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | @Callable(i) | |
147 | 147 | func potentialWinnings (gameId,userAddress,amount,type,result) = { | |
148 | 148 | let spldRes = split(result, "_") | |
149 | 149 | let $t039904398 = if ((type == 1)) | |
150 | 150 | then if ((result == "A")) | |
151 | 151 | then $Tuple3("1_0", 1, 0) | |
152 | 152 | else if ((result == "B")) | |
153 | 153 | then $Tuple3("0_1", 0, 1) | |
154 | 154 | else $Tuple3("1_1", 1, 1) | |
155 | 155 | else if ((type == 2)) | |
156 | 156 | then $Tuple3(result, parseIntValue(spldRes[0]), parseIntValue(spldRes[1])) | |
157 | 157 | else if ((spldRes[0] == "A")) | |
158 | 158 | then $Tuple3((spldRes[1] + "_0"), parseIntValue(spldRes[1]), 0) | |
159 | 159 | else $Tuple3(("0_" + spldRes[1]), 0, parseIntValue(spldRes[1])) | |
160 | 160 | let gameResult = $t039904398._1 | |
161 | 161 | let ballsA = $t039904398._2 | |
162 | 162 | let ballsB = $t039904398._3 | |
163 | 163 | let diff = if ((ballsA > ballsB)) | |
164 | 164 | then (ballsA - ballsB) | |
165 | 165 | else (ballsB - ballsA) | |
166 | 166 | let winner = if ((ballsA > ballsB)) | |
167 | 167 | then "A" | |
168 | 168 | else if ((ballsB > ballsA)) | |
169 | 169 | then "B" | |
170 | 170 | else "D" | |
171 | 171 | let G1 = (valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 1, winner)), 0) + (if ((type == 1)) | |
172 | 172 | then amount | |
173 | 173 | else 0)) | |
174 | - | let G2 = (valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 2, | |
174 | + | let G2 = (valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 2, gameResult)), 0) + (if ((type == 2)) | |
175 | 175 | then amount | |
176 | 176 | else 0)) | |
177 | 177 | let G3 = (valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 3, ((winner + "_") + toString(diff)))), 0) + (if ((type == 3)) | |
178 | 178 | then amount | |
179 | 179 | else 0)) | |
180 | 180 | let totalWinValue = ((G1 + G2) + G3) | |
181 | - | let totalBets = valueOrElse(getInteger(this, (toString(gameId) + kTotalBets)), 0) | |
181 | + | let totalBets = (valueOrElse(getInteger(this, (toString(gameId) + kTotalBets)), 0) + amount) | |
182 | 182 | let bankWithFee = (totalBets - totalWinValue) | |
183 | 183 | let fee = fraction(bankWithFee, BET_FEE, FEE_SCALE) | |
184 | 184 | let B = (bankWithFee - fee) | |
185 | 185 | let UB1 = (valueOrElse(getInteger(this, getUserBetKey(userAddress, gameId, 1, winner)), 0) + (if ((type == 1)) | |
186 | 186 | then amount | |
187 | 187 | else 0)) | |
188 | 188 | let UB2 = (valueOrElse(getInteger(this, getUserBetKey(userAddress, gameId, 2, gameResult)), 0) + (if ((type == 2)) | |
189 | 189 | then amount | |
190 | 190 | else 0)) | |
191 | 191 | let UB3 = (valueOrElse(getInteger(this, getUserBetKey(userAddress, gameId, 3, ((winner + "_") + toString(diff)))), 0) + (if ((type == 3)) | |
192 | 192 | then amount | |
193 | 193 | else 0)) | |
194 | 194 | let totalWinValueMax = ((G1 + (G2 * 3)) + (G3 * 2)) | |
195 | 195 | let D1 = if ((G1 == 0)) | |
196 | 196 | then 0 | |
197 | 197 | else (((G1 + ((G1 / totalWinValueMax) * B)) * UB1) / G1) | |
198 | 198 | let D2 = if ((G2 == 0)) | |
199 | 199 | then 0 | |
200 | - | else (((G2 + ((G2 / totalWinValueMax) * B)) * UB2) / G2) | |
200 | + | else (((G2 + (((G2 * 3) / totalWinValueMax) * B)) * UB2) / G2) | |
201 | 201 | let D3 = if ((G3 == 0)) | |
202 | 202 | then 0 | |
203 | - | else (((G3 + ((G3 / totalWinValueMax) * B)) * UB3) / G3) | |
203 | + | else (((G3 + (((G3 * 2) / totalWinValueMax) * B)) * UB3) / G3) | |
204 | 204 | let claimAmount = ((D1 + D2) + D3) | |
205 | 205 | $Tuple2(nil, claimAmount) | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | ||
210 | 210 | @Callable(i) | |
211 | 211 | func bet (gameId,type,result,refId) = valueOrElse(isActive(), { | |
212 | 212 | let user = toString(i.caller) | |
213 | 213 | let gIdStr = toString(gameId) | |
214 | - | let $ | |
215 | - | let pmtAmount = $ | |
216 | - | let pmtAssetId = $ | |
214 | + | let $t061246199 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
215 | + | let pmtAmount = $t061246199._1 | |
216 | + | let pmtAssetId = $t061246199._2 | |
217 | 217 | let gameStartTime = valueOrElse(getInteger(this, (toString(gameId) + kGameStraTime)), 0) | |
218 | 218 | let gameType = getStringValue(this, (toString(gameId) + kGameType)) | |
219 | 219 | if ((pmtAssetId != USDT)) | |
220 | 220 | then throw("Pamyment must be In USDT asset") | |
221 | 221 | else if ((MIN_BET > pmtAmount)) | |
222 | 222 | then throw((("Min bet " + toString((MIN_BET / 1000000))) + "USDT")) | |
223 | 223 | else if ((gameStartTime == 0)) | |
224 | 224 | then throw(("There is no game with id" + toString(gameId))) | |
225 | 225 | else if (((lastBlock.timestamp + ONE_HOUR) >= gameStartTime)) | |
226 | 226 | then throw("Bets on this game are no longer accepted") | |
227 | 227 | else if (!(validateBet(gameType, type, result))) | |
228 | 228 | then throw("Incorrect bet type") | |
229 | 229 | else { | |
230 | 230 | let spldRes = split(result, "_") | |
231 | 231 | let userBetKey = getUserBetKey(user, gameId, type, result) | |
232 | 232 | let totalBetsForTypeBetKey = getTotalBetsForTypeKey(gameId, type, result) | |
233 | 233 | let userBet = (valueOrElse(getInteger(this, userBetKey), 0) + pmtAmount) | |
234 | 234 | let totalBetsForTypeBet = (valueOrElse(getInteger(this, totalBetsForTypeBetKey), 0) + pmtAmount) | |
235 | 235 | let totalBets = (valueOrElse(getInteger(this, (gIdStr + kTotalBets)), 0) + pmtAmount) | |
236 | 236 | let toWinA = (valueOrElse(getInteger(this, (gIdStr + kToWinA)), 0) + (if (if ((type == 1)) | |
237 | 237 | then (result == "A") | |
238 | 238 | else false) | |
239 | 239 | then pmtAmount | |
240 | 240 | else if (if ((type == 2)) | |
241 | 241 | then (parseIntValue(spldRes[0]) > parseIntValue(spldRes[1])) | |
242 | 242 | else false) | |
243 | 243 | then pmtAmount | |
244 | 244 | else if (if ((type == 3)) | |
245 | 245 | then (spldRes[0] == "A") | |
246 | 246 | else false) | |
247 | 247 | then pmtAmount | |
248 | 248 | else 0)) | |
249 | 249 | let toWinB = (valueOrElse(getInteger(this, (gIdStr + kToWinB)), 0) + (if (if ((type == 1)) | |
250 | 250 | then (result == "B") | |
251 | 251 | else false) | |
252 | 252 | then pmtAmount | |
253 | 253 | else if (if ((type == 2)) | |
254 | 254 | then (parseIntValue(spldRes[1]) > parseIntValue(spldRes[0])) | |
255 | 255 | else false) | |
256 | 256 | then pmtAmount | |
257 | 257 | else if (if ((type == 3)) | |
258 | 258 | then (spldRes[0] == "B") | |
259 | 259 | else false) | |
260 | 260 | then pmtAmount | |
261 | 261 | else 0)) | |
262 | 262 | let onDraw = (valueOrElse(getInteger(this, (gIdStr + kOnDraw)), 0) + (if (if ((type == 1)) | |
263 | 263 | then (result == "D") | |
264 | 264 | else false) | |
265 | 265 | then pmtAmount | |
266 | 266 | else 0)) | |
267 | 267 | ([IntegerEntry(userBetKey, userBet), IntegerEntry(totalBetsForTypeBetKey, totalBetsForTypeBet), IntegerEntry((gIdStr + kTotalBets), totalBets), IntegerEntry((gIdStr + kToWinA), toWinA), IntegerEntry((gIdStr + kToWinB), toWinB), IntegerEntry((gIdStr + kOnDraw), onDraw)] ++ (if (!(isDefined(getString(this, (user + kUserRefId))))) | |
268 | 268 | then [StringEntry((user + kUserRefId), refId)] | |
269 | 269 | else nil)) | |
270 | 270 | } | |
271 | 271 | }) | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | ||
275 | 275 | @Callable(i) | |
276 | 276 | func claim (gameId) = valueOrElse(isActive(), { | |
277 | 277 | let user = toString(i.caller) | |
278 | 278 | let gIdStr = toString(gameId) | |
279 | 279 | let finalTime = valueOrErrorMessage(getInteger(this, (gIdStr + kFinalTime)), "You can claim only after game finish") | |
280 | 280 | if ((lastBlock.timestamp > (finalTime + ONE_HOUR))) | |
281 | 281 | then throw("You can claim only after one hour pass after final time") | |
282 | 282 | else if (isDefined(getBoolean(this, (((user + "_") + gIdStr) + kUserClaimed)))) | |
283 | 283 | then throw("You are alredy claimed") | |
284 | 284 | else { | |
285 | 285 | let gameResult = getStringValue(this, (gIdStr + kGameResult)) | |
286 | 286 | let spldRes = split(gameResult, "_") | |
287 | 287 | let ballsA = valueOrErrorMessage(parseInt(spldRes[0]), "Inncorrect game result") | |
288 | 288 | let ballsB = valueOrErrorMessage(parseInt(spldRes[1]), "Inncorrect game result") | |
289 | 289 | let diff = if ((ballsA > ballsB)) | |
290 | 290 | then (ballsA - ballsB) | |
291 | 291 | else (ballsB - ballsA) | |
292 | 292 | let winner = if ((ballsA > ballsB)) | |
293 | 293 | then "A" | |
294 | 294 | else if ((ballsB > ballsA)) | |
295 | 295 | then "B" | |
296 | 296 | else "D" | |
297 | 297 | let B = getIntegerValue(this, (gIdStr + kBank)) | |
298 | 298 | let UB1 = valueOrElse(getIntegerValue(this, getUserBetKey(user, gameId, 1, winner)), 0) | |
299 | 299 | let UB2 = valueOrElse(getIntegerValue(this, getUserBetKey(user, gameId, 2, gameResult)), 0) | |
300 | 300 | let UB3 = valueOrElse(getIntegerValue(this, getUserBetKey(user, gameId, 3, ((winner + "_") + toString(diff)))), 0) | |
301 | 301 | let G1 = valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 1, winner)), 0) | |
302 | 302 | let G2 = valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 2, gameResult)), 0) | |
303 | 303 | let G3 = valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 3, ((winner + "_") + toString(diff)))), 0) | |
304 | 304 | let totalWinValueMax = ((G1 + (G2 * 3)) + (G3 * 2)) | |
305 | 305 | let D1 = if ((G1 == 0)) | |
306 | 306 | then 0 | |
307 | 307 | else (((G1 + ((G1 / totalWinValueMax) * B)) * UB1) / G1) | |
308 | 308 | let D2 = if ((G2 == 0)) | |
309 | 309 | then 0 | |
310 | - | else (((G2 + ((G2 / totalWinValueMax) * B)) * UB2) / G2) | |
310 | + | else (((G2 + (((G2 * 3) / totalWinValueMax) * B)) * UB2) / G2) | |
311 | 311 | let D3 = if ((G3 == 0)) | |
312 | 312 | then 0 | |
313 | - | else (((G3 + ((G3 / totalWinValueMax) * B)) * UB3) / G3) | |
313 | + | else (((G3 + (((G3 * 2) / totalWinValueMax) * B)) * UB3) / G3) | |
314 | 314 | let claimAmount = ((D1 + D2) + D3) | |
315 | 315 | if ((claimAmount == 0)) | |
316 | 316 | then throw("Nothing to claim") | |
317 | 317 | else $Tuple2([BooleanEntry((((user + "_") + gIdStr) + kUserClaimed), true), ScriptTransfer(i.caller, claimAmount, USDT)], claimAmount) | |
318 | 318 | } | |
319 | 319 | }) | |
320 | 320 | ||
321 | 321 | ||
322 | 322 | ||
323 | 323 | @Callable(i) | |
324 | 324 | func gameSummary (gameId,result) = { | |
325 | 325 | let gIdStr = toString(gameId) | |
326 | 326 | let gameStartTime = valueOrElse(getInteger(this, (toString(gameId) + kGameStraTime)), 0) | |
327 | 327 | if ((gameStartTime == 0)) | |
328 | 328 | then throw(("There is no game with id" + toString(gameId))) | |
329 | 329 | else { | |
330 | 330 | let spldRes = split(result, "_") | |
331 | 331 | let ballsA = valueOrErrorMessage(parseInt(spldRes[0]), "Inncorrect game result") | |
332 | 332 | let ballsB = valueOrErrorMessage(parseInt(spldRes[1]), "Inncorrect game result") | |
333 | 333 | let diff = if ((ballsA > ballsB)) | |
334 | 334 | then (ballsA - ballsB) | |
335 | 335 | else (ballsB - ballsA) | |
336 | 336 | let winner = if ((ballsA > ballsB)) | |
337 | 337 | then "A" | |
338 | 338 | else if ((ballsB > ballsA)) | |
339 | 339 | then "B" | |
340 | 340 | else "D" | |
341 | 341 | let totalWinType1 = valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 1, winner)), 0) | |
342 | 342 | let totalWinType2 = valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 2, result)), 0) | |
343 | 343 | let totalWinType3 = valueOrElse(getInteger(this, getTotalBetsForTypeKey(gameId, 3, ((winner + "_") + toString(diff)))), 0) | |
344 | 344 | let totalWinValue = ((totalWinType1 + totalWinType2) + totalWinType3) | |
345 | 345 | let totalBets = valueOrElse(getInteger(this, (toString(gameId) + kTotalBets)), 0) | |
346 | 346 | let bankWithFee = (totalBets - totalWinValue) | |
347 | - | let $ | |
347 | + | let $t01151811676 = if ((totalWinValue == 0)) | |
348 | 348 | then $Tuple2(bankWithFee, 0) | |
349 | 349 | else { | |
350 | 350 | let f = fraction(bankWithFee, BET_FEE, FEE_SCALE) | |
351 | 351 | $Tuple2(f, (bankWithFee - f)) | |
352 | 352 | } | |
353 | - | let fee = $ | |
354 | - | let bank = $ | |
353 | + | let fee = $t01151811676._1 | |
354 | + | let bank = $t01151811676._2 | |
355 | 355 | [StringEntry((gIdStr + kGameResult), result), IntegerEntry((gIdStr + kBank), bank), IntegerEntry((gIdStr + kFinalTime), lastBlock.timestamp), ScriptTransfer(MONEY_BOX_ADDREES, fee, USDT)] | |
356 | 356 | } | |
357 | 357 | } | |
358 | 358 | ||
359 | 359 | ||
360 | 360 | ||
361 | 361 | @Callable(i) | |
362 | 362 | func initGames (startGameTimes,types) = { | |
363 | 363 | func initGame (acc,startGameTime) = { | |
364 | - | let $ | |
365 | - | let entries = $ | |
366 | - | let lastGameId = $ | |
367 | - | let j = $ | |
364 | + | let $t01206012094 = acc | |
365 | + | let entries = $t01206012094._1 | |
366 | + | let lastGameId = $t01206012094._2 | |
367 | + | let j = $t01206012094._3 | |
368 | 368 | let newGameId = (lastGameId + 1) | |
369 | 369 | if ((lastBlock.timestamp > startGameTime)) | |
370 | 370 | then throw("startGameTime must be in the future") | |
371 | 371 | else if (!(containsElement(GAME_TYPES, types[j]))) | |
372 | 372 | then throw(("type must contain one of values: " + makeString(GAME_TYPES, ","))) | |
373 | 373 | else { | |
374 | 374 | let gameEntries = [IntegerEntry((toString(newGameId) + kGameStraTime), startGameTime), StringEntry((toString(newGameId) + kGameType), types[j])] | |
375 | 375 | $Tuple3((entries ++ gameEntries), newGameId, (j + 1)) | |
376 | 376 | } | |
377 | 377 | } | |
378 | 378 | ||
379 | 379 | let lastGameId = valueOrElse(getInteger(this, kLastGameId), 0) | |
380 | - | let $ | |
380 | + | let $t01263712722 = { | |
381 | 381 | let $l = startGameTimes | |
382 | 382 | let $s = size($l) | |
383 | 383 | let $acc0 = $Tuple3(nil, lastGameId, 0) | |
384 | 384 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
385 | 385 | then $a | |
386 | 386 | else initGame($a, $l[$i]) | |
387 | 387 | ||
388 | 388 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
389 | 389 | then $a | |
390 | 390 | else throw("List size exceeds 50") | |
391 | 391 | ||
392 | 392 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
393 | 393 | } | |
394 | - | let gamesEntries = $ | |
395 | - | let newLGId = $ | |
394 | + | let gamesEntries = $t01263712722._1 | |
395 | + | let newLGId = $t01263712722._2 | |
396 | 396 | (gamesEntries :+ IntegerEntry(kLastGameId, newLGId)) | |
397 | 397 | } | |
398 | 398 | ||
399 | 399 | ||
400 | 400 | ||
401 | 401 | @Callable(i) | |
402 | 402 | func shutdown () = if (!(active)) | |
403 | 403 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
404 | 404 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
405 | 405 | then throw("Only admin can call this function") | |
406 | 406 | else suspend("Paused by admin") | |
407 | 407 | ||
408 | 408 | ||
409 | 409 | ||
410 | 410 | @Callable(i) | |
411 | 411 | func activate () = if (active) | |
412 | 412 | then throw("DApp is already active") | |
413 | 413 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
414 | 414 | then throw("Only admin can call this function") | |
415 | 415 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)] | |
416 | 416 | ||
417 | 417 |
github/deemru/w8io/026f985 112.48 ms ◑