tx · 812Ma5jGqBLfp9okr1iEdiyYLnSRyWfhfmntYrYdUXNv 3MpdJJV3WyZufiGHRtb7xbY2Vsc2pBFcJYZ: -0.01400000 Waves 2021.05.12 13:45 [1522352] smart account 3MpdJJV3WyZufiGHRtb7xbY2Vsc2pBFcJYZ > SELF 0.00000000 Waves
{ "type": 13, "id": "812Ma5jGqBLfp9okr1iEdiyYLnSRyWfhfmntYrYdUXNv", "fee": 1400000, "feeAssetId": null, "timestamp": 1620816347287, "version": 1, "sender": "3MpdJJV3WyZufiGHRtb7xbY2Vsc2pBFcJYZ", "senderPublicKey": "ALG9JVGNn9aCL68dbg1AmW6yDQv1b8EDLq99pQS8L1k6", "proofs": [ "4odEPvsXczSoKKt8BaBKMkkgdZ4iuGatDf2nYzbV6G5GsbCW2xWABbLa1B5MGvc3BwGBY8rkQgEsN9eUhz8Yrajn" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAADQAAAAATZ2FtZU1hc3RlclB1YmxpY0tleQEAAAAgr0DTqBm5Ld8FZPZKa/sg/XTlGOywXRjQmyyuTFZEqHUBAAAAE2F1dGhvcml6ZVBlcm1pc3Npb24AAAABAAAAD2NhbGxlclB1YmxpY0tleQkBAAAAAiE9AAAAAgUAAAAPY2FsbGVyUHVibGljS2V5BQAAABNnYW1lTWFzdGVyUHVibGljS2V5AAAAAAtkaWNlTnVtYmVycwkABEwAAAACAAAAAAAAAAABCQAETAAAAAIAAAAAAAAAAAIJAARMAAAAAgAAAAAAAAAAAwkABEwAAAACAAAAAAAAAAAECQAETAAAAAIAAAAAAAAAAAUJAARMAAAAAgAAAAAAAAAABgkABEwAAAACAAAAAAAAAAAHCQAETAAAAAIAAAAAAAAAAAgFAAAAA25pbAAAAAAOR0FNRUlOUFJPR1JFU1MAAAAAAAAAAAEAAAAADEdBTUVGSU5JU0hFRAAAAAAAAAAAAAAAAAAQZ2FtZUNvdW50ZXJMYWJlbAIAAAANR19HQU1FQ09VTlRFUgAAAAAOZ2FtZVN0YX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AGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleVWls/0=", "chainId": 84, "height": 1522352, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 2rqBmZbW51CgqQCLudFCAdZFmKuTEbNaUgCXpYDiMXSc Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let gameMasterPublicKey = base58'Co7gTLr7ZJvVKwToLpuZJqmkVecy5uwupYH6qCkKuhc8' | |
5 | + | ||
6 | + | func authorizePermission (callerPublicKey) = (callerPublicKey != gameMasterPublicKey) | |
7 | + | ||
8 | + | ||
9 | + | let diceNumbers = [1, 2, 3, 4, 5, 6, 7, 8] | |
10 | + | ||
11 | + | let GAMEINPROGRESS = 1 | |
12 | + | ||
13 | + | let GAMEFINISHED = 0 | |
14 | + | ||
15 | + | let gameCounterLabel = "G_GAMECOUNTER" | |
16 | + | ||
17 | + | let gameStateLabel = "G_STATE" | |
18 | + | ||
19 | + | let gameCurrentPointLabal = "G_CurrentPoint " | |
20 | + | ||
21 | + | let gameToken = base58'Co7gTLr7ZJvVKwToLpuZJqmkVecy5uwupYH6qCkKuhc8' | |
22 | + | ||
23 | + | let lastRolledNumber = 0 | |
24 | + | ||
25 | + | func getGameStateLabel (gameCounter) = ((("G_" + toString(gameCounter)) + "_") + gameStateLabel) | |
26 | + | ||
27 | + | ||
28 | + | func getGameState (gameCounter) = getInteger(this, getGameStateLabel(gameCounter)) | |
29 | + | ||
30 | + | ||
31 | + | func getCrapGameCounter () = getInteger(this, gameCounterLabel) | |
32 | + | ||
33 | + | ||
34 | + | @Callable(i) | |
35 | + | func initGame () = if (authorizePermission(i.callerPublicKey)) | |
36 | + | then throw("initGame_FORBIDDEN") | |
37 | + | else match getCrapGameCounter() { | |
38 | + | case counter: Int => | |
39 | + | throw("INIT_ALREADY_DONE") | |
40 | + | case _ => | |
41 | + | [IntegerEntry(gameCounterLabel, 0)] | |
42 | + | } | |
43 | + | ||
44 | + | ||
45 | + | @Verifier(tx) | |
46 | + | func verify () = match tx { | |
47 | + | case _ => | |
48 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
49 | + | } | |
50 | + |
github/deemru/w8io/169f3d6 14.73 ms ◑