tx · BAXHWDU3MNCdZhADqs1QFrDNwjVEFerxDa9nnxLhKYqt

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10001000 Waves

2022.01.16 01:48 [1880694] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "BAXHWDU3MNCdZhADqs1QFrDNwjVEFerxDa9nnxLhKYqt", "fee": 10001000, "feeAssetId": null, "timestamp": 1642286911537, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "29WCR6fHdXSKw2TKCfnUjXfXRb86m7CHhorHznTFji2cMnmctCA7APn3Tr61kgHNdgxg7QAErqvDr7ngBhUAPgWZ" ], "script": "base64:AAIEAAAAAAAAAC8IAhIECgIBARIFCgMBCAgSABIAEgUKAwEICBIECgIBARIHCgUBCAgICBIECgIBAQAAACMAAAAAE2dhbWVNYXN0ZXJQdWJsaWNLZXkBAAAAIIdjXkgFFtrkHsQ9EVCCVH0dcNZ4QrNMHlHueDDmJyUCAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBeGk1enkxSDZUMnBReDdxZ01waDlzNy9XZzgxOXNvYjlBdlFzR3NjM0R6ejVaalRraHZOTFFQZjF3dFEralZDSVQ4U0FqZ1BWV1dQM1lJOG96R3pLVzQ5U3FMaWFTcW1VNUduNHBqUjlOWUlxc05ESm1YKzlHTXBGMWRlcm1QVjVIRVl4Qk1RMk5Ba01zV0ExWElZYy9hSWEwZi93VmdNZTIwOU1VTTJvVXd5RUtBMXFBRUptc1FrWENqSk9BQWtVUUhpNkhUeXVvUXFqdDVPWmxvUytpeDJ3Tnl5ZnRCajN3cE5nUTh3K0phSTZod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E9ORQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAWc2V0dXBHYW1lc0NvdW50ZXJMYWJlbAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAVdXNlZEdhbWVzQ291bnRlckxhYmVsAAAAAAAAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAA9nYW1lTWF4QmV0TGFiZWwFAAAABm1heEJldAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAPZ2FtZU1pbkJldExhYmVsBQAAAAZtaW5CZXQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAQZGVhbGVyUXVldWVMYWJlbAIAAAAABQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleYoNFv0=", "height": 1880694, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4b5o6LZ8beQDbRrdGXc2HadoQV3tJpxZBRSoiyE4uVPo Next: GyGuRSS26AAFC1ZzhktVJUkhRNdpd8P5ceqwzmAabYLg Diff:
OldNewDifferences
111111 @Callable(i)
112112 func changeStatus (gameNumber,status) = if (checkPermission(i.callerPublicKey))
113113 then throw("changeStatus_FORBBIDEN")
114- else [IntegerEntry(getGameStateLabel(gameNumber), 0)]
114+ else [IntegerEntry(getGameStateLabel(gameNumber), status)]
115115
116116
117117
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:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxi5zy1H6T2pQx7qgMph9s7/Wg819sob9AvQsGsc3Dzz5ZjTkhvNLQPf1wtQ+jVCIT8SAjgPVWWP3YI8ozGzKW49SqLiaSqmU5Gn4pjR9NYIqsNDJmX+9GMpF1dermPV5HEYxBMQ2NAkMsWA1XIYc/aIa0f/wVgMe209MUM2oUwyEKA1qAEJmsQkXCjJOAAkUQHi6HTyuoQqjt5OZloS+ix2wNyyftBj3wpNgQ8w+JaI6htg7Nml7/NeoukuIdtUSz9nJi4asGco9jYr7q0tgVDQl6NlBHMN6CNJahpPZN/YNAb+CzAitZGlNcWIawLFec1fZOO8hbaHTuQ843j6jVQIDAQAB")
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(take(stringCard, 2))
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 changeStatus (gameNumber,status) = if (checkPermission(i.callerPublicKey))
113113 then throw("changeStatus_FORBBIDEN")
114- else [IntegerEntry(getGameStateLabel(gameNumber), 0)]
114+ else [IntegerEntry(getGameStateLabel(gameNumber), status)]
115115
116116
117117
118118 @Callable(i)
119119 func revealRound2 (currentGame,card2,card3) = if (checkPermission(i.callerPublicKey))
120120 then throw("revealRound2_FORBBIDEN")
121121 else {
122122 let dealerQueue = value(getDealerQueue())
123123 let nextGameToProcess = split(dealerQueue, ",")[1]
124124 if ((nextGameToProcess == toString(currentGame)))
125125 then if (if (if ((value(getGameState(currentGame)) == 3))
126126 then verifyCard(card2, currentGame, 2)
127127 else false)
128128 then verifyCard(card3, currentGame, 3)
129129 else false)
130130 then {
131131 let cardPlayer = getCardValue(split(card2, "+")[cardPosition])
132132 let cardCasino = getCardValue(split(card3, "+")[cardPosition])
133133 if ((cardPlayer >= cardCasino))
134134 then {
135135 let normalBet = value(getGameBetAmount(currentGame))
136136 let address = value(addressFromString(value(getGamePlayer(currentGame))))
137137 [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)]
138138 }
139139 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))))))]
140140 }
141141 else throw("One of the cards failed to be verified or game is not in state 1.")
142142 else throw(("The next game to process is " + nextGameToProcess))
143143 }
144144
145145
146146
147147 @Callable(i)
148148 func war () = {
149149 let address = toBase58String(i.caller.bytes)
150150 let currentGame = value(getPlayerCurrentGame(address))
151151 if ((value(getGameState(currentGame)) != 2))
152152 then throw("Game is not in correct state.")
153153 else {
154154 let betAmount = value(getGameBetAmount(currentGame))
155155 let p = getPayments(i)
156156 if (((p + i.fee) != betAmount))
157157 then throw((("Payment must me same as the original bet (" + toString(betAmount)) + ")"))
158158 else [IntegerEntry(getGameStateLabel(currentGame), 3), StringEntry(dealerQueueLabel, ((value(getDealerQueue()) + ",") + toString(currentGame)))]
159159 }
160160 }
161161
162162
163163
164164 @Callable(i)
165165 func surrender () = {
166166 let address = toBase58String(i.caller.bytes)
167167 let currentGame = value(getPlayerCurrentGame(address))
168168 if ((value(getGameState(currentGame)) != 2))
169169 then throw("Game is not in correct state.")
170170 else {
171171 let betAmount = value(getGameBetAmount(currentGame))
172172 let dealerQueue = value(getDealerQueue())
173173 [IntegerEntry(getGameStateLabel(currentGame), 5), ScriptTransfer(i.caller, (betAmount / 2), unit)]
174174 }
175175 }
176176
177177
178178
179179 @Callable(i)
180180 func revealRound1 (currentGame,card0,card1) = if (checkPermission(i.callerPublicKey))
181181 then throw("revealRound1_FORBBIDEN")
182182 else {
183183 let dealerQueue = value(getDealerQueue())
184184 let nextGameToProcess = split(dealerQueue, ",")[1]
185185 if ((nextGameToProcess == toString(currentGame)))
186186 then if (if (if ((value(getGameState(currentGame)) == 1))
187187 then verifyCard(card0, currentGame, 0)
188188 else false)
189189 then verifyCard(card1, currentGame, 1)
190190 else false)
191191 then {
192192 let cardPlayer = getCardValue(split(card0, "+")[cardPosition])
193193 let cardCasino = getCardValue(split(card1, "+")[cardPosition])
194194 if ((cardPlayer == cardCasino))
195195 then {
196196 let tieBet = value(getGameTieAmount(currentGame))
197197 let address = value(addressFromString(value(getGamePlayer(currentGame))))
198198 if ((tieBet != 0))
199199 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)]
200200 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))))))]
201201 }
202202 else if ((cardPlayer > cardCasino))
203203 then {
204204 let normalBet = value(getGameBetAmount(currentGame))
205205 let address = value(addressFromString(value(getGamePlayer(currentGame))))
206206 [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)]
207207 }
208208 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))))))]
209209 }
210210 else throw("One of the cards failed to be verified or game is not in state 1.")
211211 else throw(("The next game to process is " + nextGameToProcess))
212212 }
213213
214214
215215
216216 @Callable(i)
217217 func bet (normalBet,tieBet) = {
218218 let callerAddress = toBase58String(i.caller.bytes)
219219 let p = getPayments(i)
220220 let betAmount = (normalBet + i.fee)
221221 let tieAmount = tieBet
222222 let address = toBase58String(i.caller.bytes)
223223 if ((p != (normalBet + tieBet)))
224224 then throw("normal bet + tie bet should be equal to the payment")
225225 else if (if ((value(gamesMinBet()) > p))
226226 then true
227227 else (p > value(gamesMaxBet())))
228228 then throw((((("Payment needs to be in the following interval [" + toString(value(gamesMinBet()))) + " ") + toString(value(gamesMaxBet()))) + "]"))
229229 else if ((value(gamesUsedGetCounter()) >= value(gamesSetupGetCounter())))
230230 then throw("No available set up games to use.")
231231 else match getPlayerCurrentGame(address) {
232232 case CURRENTGAME: Int =>
233233 if ((4 > value(getGameState(CURRENTGAME))))
234234 then throw((("Game " + toString(CURRENTGAME)) + " is still in progress."))
235235 else createGameMetadata(address, betAmount, tieAmount)
236236 case _: Unit =>
237237 createGameMetadata(address, betAmount, tieAmount)
238238 case _ =>
239239 throw("Match error")
240240 }
241241 }
242242
243243
244244
245245 @Callable(i)
246246 func setupGame (gameNumber,card0,card1,card2,card3) = if (checkPermission(i.callerPublicKey))
247247 then throw("setupGame_FORBBIDEN")
248248 else match gamesSetupGetCounter() {
249249 case SETUPGAMESCOUNTER: Int =>
250250 let randomizer = (toInt(sha256((take(lastBlock.generationSignature, 16) + take(i.transactionId, 16)))) % 2)
251251 let currentGame = (SETUPGAMESCOUNTER + 1)
252252 if ((gameNumber != currentGame))
253253 then throw("Wrong game number.")
254254 else if (((randomizer % 2) == 1))
255255 then getGameSetup(currentGame, randomizer, card3, card2, card1, card0)
256256 else getGameSetup(currentGame, randomizer, card0, card1, card2, card3)
257257 case _ =>
258258 throw("InitGame Required")
259259 }
260260
261261
262262
263263 @Callable(i)
264264 func initGame (maxBet,minBet) = if (checkPermission(i.callerPublicKey))
265265 then throw("initGame_FORBBIDEN")
266266 else match gamesSetupGetCounter() {
267267 case GAMESCOUNTER: Int =>
268268 throw("INIT_ALREADY_DONE")
269269 case _ =>
270270 [IntegerEntry(setupGamesCounterLabel, 0), IntegerEntry(usedGamesCounterLabel, 0), IntegerEntry(gameMaxBetLabel, maxBet), IntegerEntry(gameMinBetLabel, minBet), StringEntry(dealerQueueLabel, "")]
271271 }
272272
273273
274274 @Verifier(tx)
275275 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
276276

github/deemru/w8io/026f985 
63.33 ms