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