tx · 9zgD8NoTc6ZJ1zbBFLpqNarUF5BXD7PenxGTucHDMARM

3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX:  -0.10000000 Waves

2022.01.13 18:56 [1877394] smart account 3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX > SELF 0.00000000 Waves

{ "type": 13, "id": "9zgD8NoTc6ZJ1zbBFLpqNarUF5BXD7PenxGTucHDMARM", "fee": 10000000, "feeAssetId": null, "timestamp": 1642089378419, "version": 2, "chainId": 84, "sender": "3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX", "senderPublicKey": "AcdhXSF5aWK6Lmdtv3cyCZ7vehbxsNNGagWCd2FpZo1M", "proofs": [ "5yFh8UpzaSHxbZUXg61AXLjwLErQeaoVaFe1b9kv38JezwgNSbqhJchrM8ACXFTwq6VAvP14utd2W9gEwg2q7JSe" ], "script": "base64:AAIFAAAAAAAAABQIAhIFCgMIAQESABIHCgUBCAgICAAAAA8AAAAAE2dhbWVNYXN0ZXJQdWJsaWNLZXkBAAAAIF1t2Oq4Jp6DRGnJV2x+n66xACBB37xnTL7cQnLLqBNvAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGTYmFzZTY0Ok1JSUJJekFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUkFBTUlJQkN3S0NBUUlBK0NwYnpNQktwcSs3VmFyU0RITFcwd1FTb2gyTFRiZ2wxckFoZnJ1WkdDanQ2TU80bzF2MWlMcUt5TkgzRkpzdndsTFVxbXFFN0UyV2w3TGJJUEEyNlB4TzJYQ0RmdmowT1dwN2NFSmtVQkVpeVBZQ24raXVQWFVQd3Vkb0ZnTTRXSGYwSVBiREoyTzZPZ3pRbEJCbU51Nk93cjduYUlUaUpyUEF2YWtQZ0FkbVVQdjRyT3pjdTZCUjBUOEd3c3p3cHJ2d1dabEtGNkFkMDBvbUxGRG14NjZIdkJFNTFzUkJpWElSYkpuakRobG9waXplNExvUjFGSXJRYUF1MXNmczViRUhM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mNhcmRzMgUAAAAGY2FyZHMzCQAAAgAAAAECAAAAEUluaXRHYW1lIFJlcXVpcmVkAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnI2iCP", "height": 1877394, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9tTeEjZKwdLMcf5MqFQ4ypKk6pAo1jcxvxoMP1EAAUiZ Next: Bx6s2W9sv91RCp19DALgsMeR5t43NJQC1ZZzZ68Ju6aE Diff:
OldNewDifferences
3737 func getGameShuffelOffesetLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_OFFSET")
3838
3939
40-func getGameSetup (gameNumber,randomizer,cards0) = [IntegerEntry(setupGamesCounterLabel, gameNumber), IntegerEntry(getGameStateLabel(gameNumber), 0), IntegerEntry(getGameShuffelOffesetLabel(gameNumber), randomizer), StringEntry(getGameCardsSignatureLabel(gameNumber, 0), cards0)]
40+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)]
4141
4242
4343 @Callable(i)
6969 let currentGame = (SETUPGAMESCOUNTER + 1)
7070 if ((gameNumber != currentGame))
7171 then throw("Wrong game number.")
72- else getGameSetup(currentGame, randomizer, cards0)
72+ else getGameSetup(currentGame, randomizer, cards0, cards1, cards2, cards3)
7373 case _ =>
7474 throw("InitGame Required")
7575 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let gameMasterPublicKey = base58'7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi'
55
66 let RSAPUBLIC = fromBase64String("base64:MIIBIzANBgkqhkiG9w0BAQEFAAOCARAAMIIBCwKCAQIA+CpbzMBKpq+7VarSDHLW0wQSoh2LTbgl1rAhfruZGCjt6MO4o1v1iLqKyNH3FJsvwlLUqmqE7E2Wl7LbIPA26PxO2XCDfvj0OWp7cEJkUBEiyPYCn+iuPXUPwudoFgM4WHf0IPbDJ2O6OgzQlBBmNu6Owr7naITiJrPAvakPgAdmUPv4rOzcu6BR0T8GwszwprvwWZlKF6Ad00omLFDmx66HvBE51sRBiXIRbJnjDhlopize4LoR1FIrQaAu1sfs5bEHLA33jvKybne+IDawCsiINZYdPZV1WWcURC+XAFfBiYCw4PYyguxaBRHotzLc2dOsBV1HDNIjLKVoRknyt50CAwEAAQ==")
77
88 let setupGamesCounterLabel = "G_SETUPGAMESCOUNTER"
99
1010 let usedGamesCounterLabel = "G_USEDGAMESCOUNTER"
1111
1212 let dealerQueueLabel = "G_DEALERQUEUE"
1313
1414 let gameMaxBetLabel = "G_MAXBET"
1515
1616 func gamesSetupGetCounter () = getInteger(this, setupGamesCounterLabel)
1717
1818
1919 func gamesUsedGetCounter () = getInteger(this, usedGamesCounterLabel)
2020
2121
2222 func checkPermission (callerPublicKey) = (callerPublicKey != gameMasterPublicKey)
2323
2424
2525 func getGameCardsSignatureLabel (gameNumber,card) = ((("G_" + toString(gameNumber)) + "_CARDSIGNATURE_") + toString(card))
2626
2727
2828 func getGameCardsSignature (gameNumber,card) = getString(this, getGameCardsSignatureLabel(gameNumber, card))
2929
3030
3131 func getGameCardsLabel (gameNumber,card) = ((("G_" + toString(gameNumber)) + "_CARD_") + toString(card))
3232
3333
3434 func getGameStateLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_STATE")
3535
3636
3737 func getGameShuffelOffesetLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_OFFSET")
3838
3939
40-func getGameSetup (gameNumber,randomizer,cards0) = [IntegerEntry(setupGamesCounterLabel, gameNumber), IntegerEntry(getGameStateLabel(gameNumber), 0), IntegerEntry(getGameShuffelOffesetLabel(gameNumber), randomizer), StringEntry(getGameCardsSignatureLabel(gameNumber, 0), cards0)]
40+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)]
4141
4242
4343 @Callable(i)
4444 func verifyCard (card,gameNumber,cardNumber) = {
4545 let t = rsaVerify_16Kb(SHA256, toBytes(card), fromBase64String(split(value(getGameCardsSignature(gameNumber, cardNumber)), " ")[0]), RSAPUBLIC)
4646 throw(toString(t))
4747 }
4848
4949
5050
5151 @Callable(i)
5252 func initGame () = if (checkPermission(i.callerPublicKey))
5353 then throw("initGame_FORBBIDEN")
5454 else match gamesSetupGetCounter() {
5555 case GAMESCOUNTER: Int =>
5656 throw("INIT_ALREADY_DONE")
5757 case _ =>
5858 [IntegerEntry(setupGamesCounterLabel, 0), IntegerEntry(usedGamesCounterLabel, 0), IntegerEntry(gameMaxBetLabel, 100000000), StringEntry(dealerQueueLabel, "")]
5959 }
6060
6161
6262
6363 @Callable(i)
6464 func setupGame (gameNumber,cards0,cards1,cards2,cards3) = if (checkPermission(i.callerPublicKey))
6565 then throw("setupGame_FORBIDEN")
6666 else match gamesSetupGetCounter() {
6767 case SETUPGAMESCOUNTER: Int =>
6868 let randomizer = (toInt(sha256((take(lastBlock.generationSignature, 16) + take(i.transactionId, 16)))) % 2)
6969 let currentGame = (SETUPGAMESCOUNTER + 1)
7070 if ((gameNumber != currentGame))
7171 then throw("Wrong game number.")
72- else getGameSetup(currentGame, randomizer, cards0)
72+ else getGameSetup(currentGame, randomizer, cards0, cards1, cards2, cards3)
7373 case _ =>
7474 throw("InitGame Required")
7575 }
7676
7777
7878 @Verifier(tx)
7979 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8080

github/deemru/w8io/169f3d6 
37.10 ms