tx · 7YVwMfunDHowDfTnv1oio38Sb2aYgnahqxcJDhdwDJwb

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10001000 Waves

2022.01.16 03:38 [1880794] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "7YVwMfunDHowDfTnv1oio38Sb2aYgnahqxcJDhdwDJwb", "fee": 10001000, "feeAssetId": null, "timestamp": 1642293545769, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "DMqGfsz2j55aWSaYeUJvseGJ2uxkkSu2hKytjT9S2JfmCFeWnyoH2mxMFuzPPsgTKJE94JDuDqcn2ca2XssnSU5" ], "script": "base64:AAIEAAAAAAAAACkIAhIFCgMBCAgSABIAEgUKAwEICBIECgIBARIHCgUBCAgICBIECgIBAQAAACMAAAAAE2dhbWVNYXN0ZXJQdWJsaWNLZXkBAAAAIIdjXkgFFtrkHsQ9EVCCVH0dcNZ4QrNMHlHueDDmJyUCAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGTYmFzZTY0Ok1JSUJJekFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUkFBTUlJQkN3S0NBUUlBK0NwYnpNQktwcSs3VmFyU0RITFcwd1FTb2gyTFRiZ2wxckFoZnJ1WkdDanQ2TU80bzF2MWlMcUt5TkgzRkpzdndsTFVxbXFFN0UyV2w3TGJJUEEyNlB4TzJYQ0RmdmowT1dwN2NFSmtVQkVpeVBZQ24raXVQWFVQd3Vkb0ZnTTRXSGYwSVBiREoyTzZPZ3pRbEJCbU51Nk93cjduYUlUaUpyUEF2YWtQZ0FkbVVQdjRyT3pjdTZCUjBUOEd3c3p3cHJ2d1dabEtGNkFkMDBvbUxGRG14NjZIdkJFNTFzUkJpWElSYkpuakRobG9waXplNEx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mVsAAAAAAAAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAA9nYW1lTWF4QmV0TGFiZWwFAAAABm1heEJldAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAPZ2FtZU1pbkJldExhYmVsBQAAAAZtaW5CZXQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAQZGVhbGVyUXVldWVMYWJlbAIAAAAABQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleTz8kiU=", "height": 1880794, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6dKfvDL1KCiwZtqv9AjUb27SSVpGcfqFn5U1mhk1rFWY Next: D4T7wrpDy4KnoFK183veeUvpxNxvKnVpR9fzrYLcM7G5 Diff:
OldNewDifferences
219219 then true
220220 else (p > value(gamesMaxBet())))
221221 then throw((((("Payment needs to be in the following interval [" + toString(value(gamesMinBet()))) + " ") + toString(value(gamesMaxBet()))) + "]"))
222- else if ((value(gamesUsedGetCounter()) >= value(gamesSetupGetCounter())))
223- then throw("No available set up games to use.")
224- else match getPlayerCurrentGame(address) {
225- case CURRENTGAME: Int =>
226- if ((4 > value(getGameState(CURRENTGAME))))
227- then throw((("Game " + toString(CURRENTGAME)) + " is still in progress."))
228- else createGameMetadata(address, betAmount, tieAmount)
229- case _: Unit =>
230- createGameMetadata(address, betAmount, tieAmount)
231- case _ =>
232- throw("Match error")
233- }
222+ else if ((normalBet == 0))
223+ then throw("normal bet has to be greater than 0")
224+ else if ((value(gamesUsedGetCounter()) >= value(gamesSetupGetCounter())))
225+ then throw("No available set up games to use.")
226+ else match getPlayerCurrentGame(address) {
227+ case CURRENTGAME: Int =>
228+ if ((4 > value(getGameState(CURRENTGAME))))
229+ then throw((("Game " + toString(CURRENTGAME)) + " is still in progress."))
230+ else createGameMetadata(address, betAmount, tieAmount)
231+ case _: Unit =>
232+ createGameMetadata(address, betAmount, tieAmount)
233+ case _ =>
234+ throw("Match error")
235+ }
234236 }
235237
236238
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let gameMasterPublicKey = base58'A7VvRHtZro8bvGa9KAahiP9xovdKJ5hGsTjHLMa6nRPo'
55
66 let RSAPUBLIC = fromBase64String("base64:MIIBIzANBgkqhkiG9w0BAQEFAAOCARAAMIIBCwKCAQIA+CpbzMBKpq+7VarSDHLW0wQSoh2LTbgl1rAhfruZGCjt6MO4o1v1iLqKyNH3FJsvwlLUqmqE7E2Wl7LbIPA26PxO2XCDfvj0OWp7cEJkUBEiyPYCn+iuPXUPwudoFgM4WHf0IPbDJ2O6OgzQlBBmNu6Owr7naITiJrPAvakPgAdmUPv4rOzcu6BR0T8GwszwprvwWZlKF6Ad00omLFDmx66HvBE51sRBiXIRbJnjDhlopize4LoR1FIrQaAu1sfs5bEHLA33jvKybne+IDawCsiINZYdPZV1WWcURC+XAFfBiYCw4PYyguxaBRHotzLc2dOsBV1HDNIjLKVoRknyt50CAwEAAQ==")
77
88 let gameToken = base58'AJRyxpsv9Z4v46eg9b5TpnVXn3DteJYPHRJSbMckYPWw'
99
1010 let cardPosition = 3
1111
1212 let setupGamesCounterLabel = "G_SETUPGAMESCOUNTER"
1313
1414 let usedGamesCounterLabel = "G_USEDGAMESCOUNTER"
1515
1616 let dealerQueueLabel = "G_DEALERQUEUE"
1717
1818 let gameMaxBetLabel = "G_MAXBET"
1919
2020 let gameMinBetLabel = "G_MINBET"
2121
2222 func gamesMaxBet () = getInteger(this, gameMaxBetLabel)
2323
2424
2525 func gamesMinBet () = getInteger(this, gameMinBetLabel)
2626
2727
2828 func gamesSetupGetCounter () = getInteger(this, setupGamesCounterLabel)
2929
3030
3131 func gamesUsedGetCounter () = getInteger(this, usedGamesCounterLabel)
3232
3333
3434 func getDealerQueue () = getString(this, dealerQueueLabel)
3535
3636
3737 func checkPermission (callerPublicKey) = (callerPublicKey != gameMasterPublicKey)
3838
3939
4040 func getGameBetAmountLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_BETAMOUNT")
4141
4242
4343 func getGameTieAmountLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_TIEAMOUNT")
4444
4545
4646 func getGamePlayerLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_PLAYER")
4747
4848
4949 func getGamePayoutLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_PAYOUT")
5050
5151
5252 func getGameStateLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_STATE")
5353
5454
5555 func getGameShuffelOffesetLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_OFFSET")
5656
5757
5858 func getGameCardsSignatureLabel (gameNumber,card) = ((("G_" + toString(gameNumber)) + "_CARDSIGNATURE_") + toString(card))
5959
6060
6161 func getPlayerCurrentGameLabel (address) = (("P_" + address) + "_CURRENTGAME")
6262
6363
6464 func getPlayerCurrentGame (address) = getInteger(this, getPlayerCurrentGameLabel(address))
6565
6666
6767 func getGameBetAmount (gameNumber) = getInteger(this, getGameBetAmountLabel(gameNumber))
6868
6969
7070 func getGameTieAmount (gameNumber) = getInteger(this, getGameTieAmountLabel(gameNumber))
7171
7272
7373 func getGameState (gameNumber) = getInteger(this, getGameStateLabel(gameNumber))
7474
7575
7676 func getGamePlayer (gameNumber) = getString(this, getGamePlayerLabel(gameNumber))
7777
7878
7979 func getGameCardsSignature (gameNumber,card) = getString(this, getGameCardsSignatureLabel(gameNumber, card))
8080
8181
8282 func getGameCardsLabel (gameNumber,card) = ((("G_" + toString(gameNumber)) + "_CARD_") + toString(card))
8383
8484
8585 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)]
8686
8787
8888 func createGameMetadata (address,betAmount,tieAmount) = {
8989 let gameToReserve = (value(gamesUsedGetCounter()) + 1)
9090 let dealerQueue = value(getDealerQueue())
9191 [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)]
9292 }
9393
9494
9595 func getCardValue (stringCard) = parseIntValue(split(stringCard, "/")[0])
9696
9797
9898 func getPayments (i) = if ((size(i.payments) == 0))
9999 then throw("Payment must be attached")
100100 else if ((size(i.payments) == 1))
101101 then {
102102 let pmt = i.payments[0]
103103 pmt.amount
104104 }
105105 else throw("There should be only one payment")
106106
107107
108108 func verifyCard (card,gameNumber,cardNumber) = rsaVerify_16Kb(SHA256, toBytes(card), fromBase64String(split(value(getGameCardsSignature(gameNumber, cardNumber)), " ")[0]), RSAPUBLIC)
109109
110110
111111 @Callable(i)
112112 func revealRound2 (currentGame,card2,card3) = if (checkPermission(i.callerPublicKey))
113113 then throw("revealRound2_FORBBIDEN")
114114 else {
115115 let dealerQueue = value(getDealerQueue())
116116 let nextGameToProcess = split(dealerQueue, ",")[1]
117117 if ((nextGameToProcess == toString(currentGame)))
118118 then if (if (if ((value(getGameState(currentGame)) == 3))
119119 then verifyCard(card2, currentGame, 2)
120120 else false)
121121 then verifyCard(card3, currentGame, 3)
122122 else false)
123123 then {
124124 let cardPlayer = getCardValue(split(card2, "+")[cardPosition])
125125 let cardCasino = getCardValue(split(card3, "+")[cardPosition])
126126 if ((cardPlayer >= cardCasino))
127127 then {
128128 let normalBet = value(getGameBetAmount(currentGame))
129129 let address = value(addressFromString(value(getGamePlayer(currentGame))))
130130 [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)]
131131 }
132132 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))))))]
133133 }
134134 else throw("One of the cards failed to be verified or game is not in state 1.")
135135 else throw(("The next game to process is " + nextGameToProcess))
136136 }
137137
138138
139139
140140 @Callable(i)
141141 func war () = {
142142 let address = toBase58String(i.caller.bytes)
143143 let currentGame = value(getPlayerCurrentGame(address))
144144 if ((value(getGameState(currentGame)) != 2))
145145 then throw("Game is not in correct state.")
146146 else {
147147 let betAmount = value(getGameBetAmount(currentGame))
148148 let p = getPayments(i)
149149 if (((p + i.fee) != betAmount))
150150 then throw((("Payment must me same as the original bet (" + toString((betAmount - i.fee))) + ")"))
151151 else [IntegerEntry(getGameStateLabel(currentGame), 3), StringEntry(dealerQueueLabel, ((value(getDealerQueue()) + ",") + toString(currentGame)))]
152152 }
153153 }
154154
155155
156156
157157 @Callable(i)
158158 func surrender () = {
159159 let address = toBase58String(i.caller.bytes)
160160 let currentGame = value(getPlayerCurrentGame(address))
161161 if ((value(getGameState(currentGame)) != 2))
162162 then throw("Game is not in correct state.")
163163 else {
164164 let betAmount = value(getGameBetAmount(currentGame))
165165 let dealerQueue = value(getDealerQueue())
166166 [IntegerEntry(getGameStateLabel(currentGame), 5), ScriptTransfer(i.caller, (betAmount / 2), unit)]
167167 }
168168 }
169169
170170
171171
172172 @Callable(i)
173173 func revealRound1 (currentGame,card0,card1) = if (checkPermission(i.callerPublicKey))
174174 then throw("revealRound1_FORBBIDEN")
175175 else {
176176 let dealerQueue = value(getDealerQueue())
177177 let nextGameToProcess = split(dealerQueue, ",")[1]
178178 if ((nextGameToProcess == toString(currentGame)))
179179 then if (if (if ((value(getGameState(currentGame)) == 1))
180180 then verifyCard(card0, currentGame, 0)
181181 else false)
182182 then verifyCard(card1, currentGame, 1)
183183 else false)
184184 then {
185185 let cardPlayer = getCardValue(split(card0, "+")[cardPosition])
186186 let cardCasino = getCardValue(split(card1, "+")[cardPosition])
187187 if ((cardPlayer == cardCasino))
188188 then {
189189 let tieBet = value(getGameTieAmount(currentGame))
190190 let address = value(addressFromString(value(getGamePlayer(currentGame))))
191191 if ((tieBet != 0))
192192 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)]
193193 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))))))]
194194 }
195195 else if ((cardPlayer > cardCasino))
196196 then {
197197 let normalBet = value(getGameBetAmount(currentGame))
198198 let address = value(addressFromString(value(getGamePlayer(currentGame))))
199199 [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)]
200200 }
201201 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))))))]
202202 }
203203 else throw("One of the cards failed to be verified or game is not in state 1.")
204204 else throw(("The next game to process is " + nextGameToProcess))
205205 }
206206
207207
208208
209209 @Callable(i)
210210 func bet (normalBet,tieBet) = {
211211 let callerAddress = toBase58String(i.caller.bytes)
212212 let p = getPayments(i)
213213 let betAmount = (normalBet + i.fee)
214214 let tieAmount = tieBet
215215 let address = toBase58String(i.caller.bytes)
216216 if ((p != (normalBet + tieBet)))
217217 then throw("normal bet + tie bet should be equal to the payment")
218218 else if (if ((value(gamesMinBet()) > p))
219219 then true
220220 else (p > value(gamesMaxBet())))
221221 then throw((((("Payment needs to be in the following interval [" + toString(value(gamesMinBet()))) + " ") + toString(value(gamesMaxBet()))) + "]"))
222- else if ((value(gamesUsedGetCounter()) >= value(gamesSetupGetCounter())))
223- then throw("No available set up games to use.")
224- else match getPlayerCurrentGame(address) {
225- case CURRENTGAME: Int =>
226- if ((4 > value(getGameState(CURRENTGAME))))
227- then throw((("Game " + toString(CURRENTGAME)) + " is still in progress."))
228- else createGameMetadata(address, betAmount, tieAmount)
229- case _: Unit =>
230- createGameMetadata(address, betAmount, tieAmount)
231- case _ =>
232- throw("Match error")
233- }
222+ else if ((normalBet == 0))
223+ then throw("normal bet has to be greater than 0")
224+ else if ((value(gamesUsedGetCounter()) >= value(gamesSetupGetCounter())))
225+ then throw("No available set up games to use.")
226+ else match getPlayerCurrentGame(address) {
227+ case CURRENTGAME: Int =>
228+ if ((4 > value(getGameState(CURRENTGAME))))
229+ then throw((("Game " + toString(CURRENTGAME)) + " is still in progress."))
230+ else createGameMetadata(address, betAmount, tieAmount)
231+ case _: Unit =>
232+ createGameMetadata(address, betAmount, tieAmount)
233+ case _ =>
234+ throw("Match error")
235+ }
234236 }
235237
236238
237239
238240 @Callable(i)
239241 func setupGame (gameNumber,card0,card1,card2,card3) = if (checkPermission(i.callerPublicKey))
240242 then throw("setupGame_FORBBIDEN")
241243 else match gamesSetupGetCounter() {
242244 case SETUPGAMESCOUNTER: Int =>
243245 let randomizer = (toInt(sha256((take(lastBlock.generationSignature, 16) + take(i.transactionId, 16)))) % 2)
244246 let currentGame = (SETUPGAMESCOUNTER + 1)
245247 if ((gameNumber != currentGame))
246248 then throw("Wrong game number.")
247249 else if (((randomizer % 2) == 1))
248250 then getGameSetup(currentGame, randomizer, card3, card2, card1, card0)
249251 else getGameSetup(currentGame, randomizer, card0, card1, card2, card3)
250252 case _ =>
251253 throw("InitGame Required")
252254 }
253255
254256
255257
256258 @Callable(i)
257259 func initGame (maxBet,minBet) = if (checkPermission(i.callerPublicKey))
258260 then throw("initGame_FORBBIDEN")
259261 else match gamesSetupGetCounter() {
260262 case GAMESCOUNTER: Int =>
261263 throw("INIT_ALREADY_DONE")
262264 case _ =>
263265 [IntegerEntry(setupGamesCounterLabel, 0), IntegerEntry(usedGamesCounterLabel, 0), IntegerEntry(gameMaxBetLabel, maxBet), IntegerEntry(gameMinBetLabel, minBet), StringEntry(dealerQueueLabel, "")]
264266 }
265267
266268
267269 @Verifier(tx)
268270 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
269271

github/deemru/w8io/026f985 
49.91 ms