tx · 6KbwVDd4d7TUtQUB5WYaA6DXcquQRvU1CQe6fwteaLLm 3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2: -0.01400000 Waves 2019.08.10 19:10 [625139] smart account 3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2 > SELF 0.00000000 Waves
{ "type": 13, "id": "6KbwVDd4d7TUtQUB5WYaA6DXcquQRvU1CQe6fwteaLLm", "fee": 1400000, "feeAssetId": null, "timestamp": 1565453375278, "version": 1, "sender": "3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2", "senderPublicKey": "F3vhYapU4NBzfM2X4KNkoFcxj3UbYnJjqituG6KE7ZPG", "proofs": [ "5ufi34m3NPhrPuXy34rFECGn5LFBEgvbGDLU5nMPDwfsckgKBope3fCv7SGZnmNcn92o5vggghxik4xwbUfF6REJ" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAABBDTE9TRURGT1JCRVRUSU5HAgAAABBDTE9TRURGT1JCRVRUSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAJREFQUE9XTkVSAgAAACMzTjROUGl2b1RodHNrcjdKeG5OcktMN3M4QnptUkd4OXJUMgEAAAAQZ2V0Q29udGV4dFN0YXR1cwAAAAACAAAADmNvbnRleHRfc3RhdHVzAAAAAQAAAAFpAQAAABBzZXRDb250ZXN0U3RhdHVzAAAAAQAAAAZzdGF0dXMEAAAAB2FjY291bnQJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwMJAQAAAAIhPQAAAAIFAAAAB2FjY291bnQFAAAACURBUFBPV05FUgkAAAIAAAABAgAAACdPbmx5IGRBUFAgT3duZXIgY2FuIHNldCBDb250ZXN0IFN0YXR1cy4DAwMJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAAHUlVOTklORwkBAAAAAiE9AAAAAgUAAAAGc3RhdHVzBQAAABBDTE9TRURGT1JCRVRUSU5HBwkBAAAAAiE9AAAAAgUAAAAGc3RhdHVzBQAAAAZDTE9TRUQHCQAAAgAAAAEJAAEsAAAAAgIAAAAQSW52YWxpZCBzdGF0dXM6IAUAAAAGc3RhdHVzCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAA5jb250ZXN0X3N0YXR1cwUAAAAGc3RhdHVzBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24JAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Bw5bB0o=", "chainId": 84, "height": 625139, "spentComplexity": 0 } View: original | compacted Prev: none Next: 5xovUmRdDerYDtFhoyHPC8QkaryjWP8AeBZvjJ94umu Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let RUNNING = "RUNNING" | |
5 | + | ||
6 | + | let CLOSEDFORBETTING = "CLOSEDFORBETTING" | |
7 | + | ||
8 | + | let CLOSED = "CLOSED" | |
9 | + | ||
10 | + | let DAPPOWNER = "3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2" | |
11 | + | ||
12 | + | func getContextStatus () = "context_status" | |
13 | + | ||
14 | + | ||
15 | + | @Callable(i) | |
16 | + | func setContestStatus (status) = { | |
17 | + | let account = toBase58String(i.caller.bytes) | |
18 | + | if ((account != DAPPOWNER)) | |
19 | + | then throw("Only dAPP Owner can set Contest Status.") | |
20 | + | else if (if (if ((status != RUNNING)) | |
21 | + | then (status != CLOSEDFORBETTING) | |
22 | + | else false) | |
23 | + | then (status != CLOSED) | |
24 | + | else false) | |
25 | + | then throw(("Invalid status: " + status)) | |
26 | + | else WriteSet([DataEntry("contest_status", status)]) | |
27 | + | } | |
28 | + | ||
29 | + | ||
30 | + | @Verifier(tx) | |
31 | + | func verify () = match tx { | |
32 | + | case _: SetScriptTransaction|DataTransaction => | |
33 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
34 | + | case _ => | |
35 | + | false | |
36 | + | } | |
37 | + |
github/deemru/w8io/169f3d6 19.55 ms ◑