tx · 5HSiYfmJom1bANuwDZ1BGkqtBAF5mQEF4XiCXtjpbBCJ 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd: -0.10000100 Waves 2022.01.16 02:18 [1880722] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves
{ "type": 13, "id": "5HSiYfmJom1bANuwDZ1BGkqtBAF5mQEF4XiCXtjpbBCJ", "fee": 10000100, "feeAssetId": null, "timestamp": 1642288747757, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "3LmCpZThoxKG1wATHEUKLBjh4SCTCjZ7z5zjU7zTwAwZsoKSVtxximfZS5ZtP354rAvx8S83MWdpNPpMVE2crj7C" ], "script": "base64:AAIEAAAAAAAAACkIAhIFCgMBCAgSABIAEgUKAwEICBIECgIBARIHCgUBCAgICBIECgIBAQAAACMAAAAAE2dhbWVNYXN0ZXJQdWJsaWNLZXkBAAAAIIdjXkgFFtrkHsQ9EVCCVH0dcNZ4QrNMHlHueDDmJyUCAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGTYmFzZTY0Ok1JSUJJekFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUkFBTUlJQkN3S0NBUUlBK0NwYnpNQktwcSs3VmFyU0RITFcwd1FTb2gyTFRiZ2wxckFoZnJ1WkdDanQ2TU80bzF2MWlMcUt5TkgzRkpzdndsTFVxbXFFN0UyV2w3TGJJUEEyNlB4TzJYQ0RmdmowT1dwN2NFSmtVQkVpeVBZQ24raXVQWFVQd3Vkb0ZnTTRXSGYwSVBiREoyTzZPZ3pRbEJCbU51Nk93cjduYUlUaUpyUEF2YWtQZ0FkbVVQdjRyT3pjdTZCUjBUOEd3c3p3cHJ2d1dabEtGNkFkMDBvbUxGRG14NjZIdkJFNTFzUkJpWElSYkpuakRobG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pbkJldExhYmVsBQAAAAZtaW5CZXQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAQZGVhbGVyUXVldWVMYWJlbAIAAAAABQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleS4Jcno=", "height": 1880722, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DDCa1dXQktwScsywHS9t1eA5XFR6xocgMnPnBicbNG6R Next: 6dKfvDL1KCiwZtqv9AjUb27SSVpGcfqFn5U1mhk1rFWY Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let gameToken = base58'AJRyxpsv9Z4v46eg9b5TpnVXn3DteJYPHRJSbMckYPWw' | |
9 | 9 | ||
10 | - | let cardPosition = | |
10 | + | let cardPosition = 3 | |
11 | 11 | ||
12 | 12 | let setupGamesCounterLabel = "G_SETUPGAMESCOUNTER" | |
13 | 13 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let gameMasterPublicKey = base58'A7VvRHtZro8bvGa9KAahiP9xovdKJ5hGsTjHLMa6nRPo' | |
5 | 5 | ||
6 | 6 | let RSAPUBLIC = fromBase64String("base64:MIIBIzANBgkqhkiG9w0BAQEFAAOCARAAMIIBCwKCAQIA+CpbzMBKpq+7VarSDHLW0wQSoh2LTbgl1rAhfruZGCjt6MO4o1v1iLqKyNH3FJsvwlLUqmqE7E2Wl7LbIPA26PxO2XCDfvj0OWp7cEJkUBEiyPYCn+iuPXUPwudoFgM4WHf0IPbDJ2O6OgzQlBBmNu6Owr7naITiJrPAvakPgAdmUPv4rOzcu6BR0T8GwszwprvwWZlKF6Ad00omLFDmx66HvBE51sRBiXIRbJnjDhlopize4LoR1FIrQaAu1sfs5bEHLA33jvKybne+IDawCsiINZYdPZV1WWcURC+XAFfBiYCw4PYyguxaBRHotzLc2dOsBV1HDNIjLKVoRknyt50CAwEAAQ==") | |
7 | 7 | ||
8 | 8 | let gameToken = base58'AJRyxpsv9Z4v46eg9b5TpnVXn3DteJYPHRJSbMckYPWw' | |
9 | 9 | ||
10 | - | let cardPosition = | |
10 | + | let cardPosition = 3 | |
11 | 11 | ||
12 | 12 | let setupGamesCounterLabel = "G_SETUPGAMESCOUNTER" | |
13 | 13 | ||
14 | 14 | let usedGamesCounterLabel = "G_USEDGAMESCOUNTER" | |
15 | 15 | ||
16 | 16 | let dealerQueueLabel = "G_DEALERQUEUE" | |
17 | 17 | ||
18 | 18 | let gameMaxBetLabel = "G_MAXBET" | |
19 | 19 | ||
20 | 20 | let gameMinBetLabel = "G_MINBET" | |
21 | 21 | ||
22 | 22 | func gamesMaxBet () = getInteger(this, gameMaxBetLabel) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func gamesMinBet () = getInteger(this, gameMinBetLabel) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func gamesSetupGetCounter () = getInteger(this, setupGamesCounterLabel) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func gamesUsedGetCounter () = getInteger(this, usedGamesCounterLabel) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func getDealerQueue () = getString(this, dealerQueueLabel) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func checkPermission (callerPublicKey) = (callerPublicKey != gameMasterPublicKey) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func getGameBetAmountLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_BETAMOUNT") | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func getGameTieAmountLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_TIEAMOUNT") | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func getGamePlayerLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_PLAYER") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getGamePayoutLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_PAYOUT") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getGameStateLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_STATE") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getGameShuffelOffesetLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_OFFSET") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getGameCardsSignatureLabel (gameNumber,card) = ((("G_" + toString(gameNumber)) + "_CARDSIGNATURE_") + toString(card)) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getPlayerCurrentGameLabel (address) = (("P_" + address) + "_CURRENTGAME") | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getPlayerCurrentGame (address) = getInteger(this, getPlayerCurrentGameLabel(address)) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getGameBetAmount (gameNumber) = getInteger(this, getGameBetAmountLabel(gameNumber)) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getGameTieAmount (gameNumber) = getInteger(this, getGameTieAmountLabel(gameNumber)) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getGameState (gameNumber) = getInteger(this, getGameStateLabel(gameNumber)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getGamePlayer (gameNumber) = getString(this, getGamePlayerLabel(gameNumber)) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getGameCardsSignature (gameNumber,card) = getString(this, getGameCardsSignatureLabel(gameNumber, card)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getGameCardsLabel (gameNumber,card) = ((("G_" + toString(gameNumber)) + "_CARD_") + toString(card)) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getGameSetup (gameNumber,randomizer,cards0,cards1,cards2,cards3) = [IntegerEntry(setupGamesCounterLabel, gameNumber), IntegerEntry(getGameStateLabel(gameNumber), 0), IntegerEntry(getGameShuffelOffesetLabel(gameNumber), randomizer), StringEntry(getGameCardsSignatureLabel(gameNumber, 0), cards0), StringEntry(getGameCardsSignatureLabel(gameNumber, 1), cards1), StringEntry(getGameCardsSignatureLabel(gameNumber, 2), cards2), StringEntry(getGameCardsSignatureLabel(gameNumber, 3), cards3)] | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func createGameMetadata (address,betAmount,tieAmount) = { | |
89 | 89 | let gameToReserve = (value(gamesUsedGetCounter()) + 1) | |
90 | 90 | let dealerQueue = value(getDealerQueue()) | |
91 | 91 | [IntegerEntry(usedGamesCounterLabel, gameToReserve), IntegerEntry(getPlayerCurrentGameLabel(address), gameToReserve), IntegerEntry(getGameStateLabel(gameToReserve), 1), IntegerEntry(getGameBetAmountLabel(gameToReserve), betAmount), IntegerEntry(getGameTieAmountLabel(gameToReserve), tieAmount), StringEntry(dealerQueueLabel, ((value(getDealerQueue()) + ",") + toString(gameToReserve))), StringEntry(getGamePlayerLabel(gameToReserve), address)] | |
92 | 92 | } | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getCardValue (stringCard) = parseIntValue(split(stringCard, "/")[0]) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getPayments (i) = if ((size(i.payments) == 0)) | |
99 | 99 | then throw("Payment must be attached") | |
100 | 100 | else if ((size(i.payments) == 1)) | |
101 | 101 | then { | |
102 | 102 | let pmt = i.payments[0] | |
103 | 103 | pmt.amount | |
104 | 104 | } | |
105 | 105 | else throw("There should be only one payment") | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func verifyCard (card,gameNumber,cardNumber) = rsaVerify_16Kb(SHA256, toBytes(card), fromBase64String(split(value(getGameCardsSignature(gameNumber, cardNumber)), " ")[0]), RSAPUBLIC) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | @Callable(i) | |
112 | 112 | func revealRound2 (currentGame,card2,card3) = if (checkPermission(i.callerPublicKey)) | |
113 | 113 | then throw("revealRound2_FORBBIDEN") | |
114 | 114 | else { | |
115 | 115 | let dealerQueue = value(getDealerQueue()) | |
116 | 116 | let nextGameToProcess = split(dealerQueue, ",")[1] | |
117 | 117 | if ((nextGameToProcess == toString(currentGame))) | |
118 | 118 | then if (if (if ((value(getGameState(currentGame)) == 3)) | |
119 | 119 | then verifyCard(card2, currentGame, 2) | |
120 | 120 | else false) | |
121 | 121 | then verifyCard(card3, currentGame, 3) | |
122 | 122 | else false) | |
123 | 123 | then { | |
124 | 124 | let cardPlayer = getCardValue(split(card2, "+")[cardPosition]) | |
125 | 125 | let cardCasino = getCardValue(split(card3, "+")[cardPosition]) | |
126 | 126 | if ((cardPlayer >= cardCasino)) | |
127 | 127 | then { | |
128 | 128 | let normalBet = value(getGameBetAmount(currentGame)) | |
129 | 129 | let address = value(addressFromString(value(getGamePlayer(currentGame)))) | |
130 | 130 | [StringEntry(getGameCardsLabel(currentGame, 2), card2), StringEntry(getGameCardsLabel(currentGame, 3), card3), IntegerEntry(getGameStateLabel(currentGame), 6), StringEntry(dealerQueueLabel, takeRight(dealerQueue, (size(dealerQueue) - (1 + size(toString(currentGame)))))), ScriptTransfer(address, ((normalBet * 2) + (normalBet - i.fee)), unit)] | |
131 | 131 | } | |
132 | 132 | else [StringEntry(getGameCardsLabel(currentGame, 2), card2), StringEntry(getGameCardsLabel(currentGame, 3), card3), IntegerEntry(getGameStateLabel(currentGame), 6), StringEntry(dealerQueueLabel, takeRight(dealerQueue, (size(dealerQueue) - (1 + size(toString(currentGame))))))] | |
133 | 133 | } | |
134 | 134 | else throw("One of the cards failed to be verified or game is not in state 1.") | |
135 | 135 | else throw(("The next game to process is " + nextGameToProcess)) | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(i) | |
141 | 141 | func war () = { | |
142 | 142 | let address = toBase58String(i.caller.bytes) | |
143 | 143 | let currentGame = value(getPlayerCurrentGame(address)) | |
144 | 144 | if ((value(getGameState(currentGame)) != 2)) | |
145 | 145 | then throw("Game is not in correct state.") | |
146 | 146 | else { | |
147 | 147 | let betAmount = value(getGameBetAmount(currentGame)) | |
148 | 148 | let p = getPayments(i) | |
149 | 149 | if (((p + i.fee) != betAmount)) | |
150 | 150 | then throw((("Payment must me same as the original bet (" + toString(betAmount)) + ")")) | |
151 | 151 | else [IntegerEntry(getGameStateLabel(currentGame), 3), StringEntry(dealerQueueLabel, ((value(getDealerQueue()) + ",") + toString(currentGame)))] | |
152 | 152 | } | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | ||
157 | 157 | @Callable(i) | |
158 | 158 | func surrender () = { | |
159 | 159 | let address = toBase58String(i.caller.bytes) | |
160 | 160 | let currentGame = value(getPlayerCurrentGame(address)) | |
161 | 161 | if ((value(getGameState(currentGame)) != 2)) | |
162 | 162 | then throw("Game is not in correct state.") | |
163 | 163 | else { | |
164 | 164 | let betAmount = value(getGameBetAmount(currentGame)) | |
165 | 165 | let dealerQueue = value(getDealerQueue()) | |
166 | 166 | [IntegerEntry(getGameStateLabel(currentGame), 5), ScriptTransfer(i.caller, (betAmount / 2), unit)] | |
167 | 167 | } | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | ||
172 | 172 | @Callable(i) | |
173 | 173 | func revealRound1 (currentGame,card0,card1) = if (checkPermission(i.callerPublicKey)) | |
174 | 174 | then throw("revealRound1_FORBBIDEN") | |
175 | 175 | else { | |
176 | 176 | let dealerQueue = value(getDealerQueue()) | |
177 | 177 | let nextGameToProcess = split(dealerQueue, ",")[1] | |
178 | 178 | if ((nextGameToProcess == toString(currentGame))) | |
179 | 179 | then if (if (if ((value(getGameState(currentGame)) == 1)) | |
180 | 180 | then verifyCard(card0, currentGame, 0) | |
181 | 181 | else false) | |
182 | 182 | then verifyCard(card1, currentGame, 1) | |
183 | 183 | else false) | |
184 | 184 | then { | |
185 | 185 | let cardPlayer = getCardValue(split(card0, "+")[cardPosition]) | |
186 | 186 | let cardCasino = getCardValue(split(card1, "+")[cardPosition]) | |
187 | 187 | if ((cardPlayer == cardCasino)) | |
188 | 188 | then { | |
189 | 189 | let tieBet = value(getGameTieAmount(currentGame)) | |
190 | 190 | let address = value(addressFromString(value(getGamePlayer(currentGame)))) | |
191 | 191 | if ((tieBet != 0)) | |
192 | 192 | then [StringEntry(getGameCardsLabel(currentGame, 0), card0), StringEntry(getGameCardsLabel(currentGame, 1), card1), IntegerEntry(getGameStateLabel(currentGame), 2), StringEntry(dealerQueueLabel, takeRight(dealerQueue, (size(dealerQueue) - (1 + size(toString(currentGame)))))), ScriptTransfer(address, ((tieBet * 10) + tieBet), unit)] | |
193 | 193 | else [StringEntry(getGameCardsLabel(currentGame, 0), card0), StringEntry(getGameCardsLabel(currentGame, 1), card1), IntegerEntry(getGameStateLabel(currentGame), 2), StringEntry(dealerQueueLabel, takeRight(dealerQueue, (size(dealerQueue) - (1 + size(toString(currentGame))))))] | |
194 | 194 | } | |
195 | 195 | else if ((cardPlayer > cardCasino)) | |
196 | 196 | then { | |
197 | 197 | let normalBet = value(getGameBetAmount(currentGame)) | |
198 | 198 | let address = value(addressFromString(value(getGamePlayer(currentGame)))) | |
199 | 199 | [StringEntry(getGameCardsLabel(currentGame, 0), card0), StringEntry(getGameCardsLabel(currentGame, 1), card1), IntegerEntry(getGameStateLabel(currentGame), 4), StringEntry(dealerQueueLabel, takeRight(dealerQueue, (size(dealerQueue) - (1 + size(toString(currentGame)))))), ScriptTransfer(address, normalBet, unit)] | |
200 | 200 | } | |
201 | 201 | else [StringEntry(getGameCardsLabel(currentGame, 0), card0), StringEntry(getGameCardsLabel(currentGame, 1), card1), IntegerEntry(getGameStateLabel(currentGame), 4), StringEntry(dealerQueueLabel, takeRight(dealerQueue, (size(dealerQueue) - (1 + size(toString(currentGame))))))] | |
202 | 202 | } | |
203 | 203 | else throw("One of the cards failed to be verified or game is not in state 1.") | |
204 | 204 | else throw(("The next game to process is " + nextGameToProcess)) | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | ||
209 | 209 | @Callable(i) | |
210 | 210 | func bet (normalBet,tieBet) = { | |
211 | 211 | let callerAddress = toBase58String(i.caller.bytes) | |
212 | 212 | let p = getPayments(i) | |
213 | 213 | let betAmount = (normalBet + i.fee) | |
214 | 214 | let tieAmount = tieBet | |
215 | 215 | let address = toBase58String(i.caller.bytes) | |
216 | 216 | if ((p != (normalBet + tieBet))) | |
217 | 217 | then throw("normal bet + tie bet should be equal to the payment") | |
218 | 218 | else if (if ((value(gamesMinBet()) > p)) | |
219 | 219 | then true | |
220 | 220 | else (p > value(gamesMaxBet()))) | |
221 | 221 | then throw((((("Payment needs to be in the following interval [" + toString(value(gamesMinBet()))) + " ") + toString(value(gamesMaxBet()))) + "]")) | |
222 | 222 | else if ((value(gamesUsedGetCounter()) >= value(gamesSetupGetCounter()))) | |
223 | 223 | then throw("No available set up games to use.") | |
224 | 224 | else match getPlayerCurrentGame(address) { | |
225 | 225 | case CURRENTGAME: Int => | |
226 | 226 | if ((4 > value(getGameState(CURRENTGAME)))) | |
227 | 227 | then throw((("Game " + toString(CURRENTGAME)) + " is still in progress.")) | |
228 | 228 | else createGameMetadata(address, betAmount, tieAmount) | |
229 | 229 | case _: Unit => | |
230 | 230 | createGameMetadata(address, betAmount, tieAmount) | |
231 | 231 | case _ => | |
232 | 232 | throw("Match error") | |
233 | 233 | } | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | ||
238 | 238 | @Callable(i) | |
239 | 239 | func setupGame (gameNumber,card0,card1,card2,card3) = if (checkPermission(i.callerPublicKey)) | |
240 | 240 | then throw("setupGame_FORBBIDEN") | |
241 | 241 | else match gamesSetupGetCounter() { | |
242 | 242 | case SETUPGAMESCOUNTER: Int => | |
243 | 243 | let randomizer = (toInt(sha256((take(lastBlock.generationSignature, 16) + take(i.transactionId, 16)))) % 2) | |
244 | 244 | let currentGame = (SETUPGAMESCOUNTER + 1) | |
245 | 245 | if ((gameNumber != currentGame)) | |
246 | 246 | then throw("Wrong game number.") | |
247 | 247 | else if (((randomizer % 2) == 1)) | |
248 | 248 | then getGameSetup(currentGame, randomizer, card3, card2, card1, card0) | |
249 | 249 | else getGameSetup(currentGame, randomizer, card0, card1, card2, card3) | |
250 | 250 | case _ => | |
251 | 251 | throw("InitGame Required") | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | ||
256 | 256 | @Callable(i) | |
257 | 257 | func initGame (maxBet,minBet) = if (checkPermission(i.callerPublicKey)) | |
258 | 258 | then throw("initGame_FORBBIDEN") | |
259 | 259 | else match gamesSetupGetCounter() { | |
260 | 260 | case GAMESCOUNTER: Int => | |
261 | 261 | throw("INIT_ALREADY_DONE") | |
262 | 262 | case _ => | |
263 | 263 | [IntegerEntry(setupGamesCounterLabel, 0), IntegerEntry(usedGamesCounterLabel, 0), IntegerEntry(gameMaxBetLabel, maxBet), IntegerEntry(gameMinBetLabel, minBet), StringEntry(dealerQueueLabel, "")] | |
264 | 264 | } | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | @Verifier(tx) | |
268 | 268 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
269 | 269 |
github/deemru/w8io/026f985 39.07 ms ◑