tx · 3DDNRiajpBHH6Kf6UgJhF1EHMSxyq5Xfi4UWgzpzgyQj 3MrYkJeqrufALCsGhXwcNxACVFbCYzE61yk: -0.01000000 Waves 2019.09.25 13:00 [691714] smart account 3MrYkJeqrufALCsGhXwcNxACVFbCYzE61yk > SELF 0.00000000 Waves
{ "type": 13, "id": "3DDNRiajpBHH6Kf6UgJhF1EHMSxyq5Xfi4UWgzpzgyQj", "fee": 1000000, "feeAssetId": null, "timestamp": 1569405680225, "version": 1, "sender": "3MrYkJeqrufALCsGhXwcNxACVFbCYzE61yk", "senderPublicKey": "6KMPZeYtPd2PGkCrTio3BhGqeQrrtyQN9VQLp1Lm5PaL", "proofs": [ "qGGgNP9EcYDwctpUPMSh8kQwgQPmGQJ94QurD9q9ZoWKKPWMGfVyA1YbNrKKvjxBbsQtuiooW5LXcTxqsu12nPM" ], "script": "base64:AAIDAAAAAAAAAAAAAAAJAQAAABxnZXRFeHRLZXlJdGVtV2hpdGVMaXN0U3RhdHVzAAAAAQAAAAdhY2NvdW50CQABLAAAAAICAAAAEHZlcmlmaWVyX3N0YXR1c18FAAAAB2FjY291bnQBAAAAHmdldEV4dFZhbHVlSXRlbVdoaXRlTGlzdFN0YXR1cwAAAAEAAAAGc3RhdHVzBQAAAAZzdGF0dXMAAAAACHZlcmlmaWVyAgAAACMzUDRybUV0UGlCeGFyc2NCNGc1dmlSSHl2bnVkdjVuSjhtdgAAAAALV0hJVEVMSVNURUQCAAAACnJlZ2lzdGVyZWQAAAAAC0JMQUNLTElTVEVEAgAAAAtibGFja2xpc3RlZAAAAAAHSU5WSVRFRAIAAAAHaW52aXRlZAAAAAALU1BFTkRJTlZJVEUCAAAADHNwZW5kX2ludml0ZQAAAAAJTU9ERVJBVE9SAgAAAAltb2RlcmF0b3IAAAAABUFETUlOAgAAAAVhZG1pbgAAAAEAAAABaQEAAAAJc2V0c3RhdHVzAAAAAgAAAAdhY2NvdW50AAAABnN0YXR1cwQAAAAGY2FsbGVyCQACWAAAAAE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AAAFpAAAABnByb29mcwAAAAAAAAAAAAgFAAAAAWkAAAAJYm9keUJ5dGVzAQAAACBO/fFw2VmfhSpB7cYnKyZrURjNKcZek8Psth15B1VhZQeQsp60", "chainId": 84, "height": 691714, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func getExtKeyItemWhiteListStatus (account) = ("verifier_status_" + account) | |
5 | + | ||
6 | + | ||
7 | + | func getExtValueItemWhiteListStatus (status) = status | |
8 | + | ||
9 | + | ||
10 | + | let verifier = "3P4rmEtPiBxarscB4g5viRHyvnudv5nJ8mv" | |
11 | + | ||
12 | + | let WHITELISTED = "registered" | |
13 | + | ||
14 | + | let BLACKLISTED = "blacklisted" | |
15 | + | ||
16 | + | let INVITED = "invited" | |
17 | + | ||
18 | + | let SPENDINVITE = "spend_invite" | |
19 | + | ||
20 | + | let MODERATOR = "moderator" | |
21 | + | ||
22 | + | let ADMIN = "admin" | |
23 | + | ||
24 | + | @Callable(i) | |
25 | + | func setstatus (account,status) = { | |
26 | + | let caller = toBase58String(i.caller.bytes) | |
27 | + | if (if ((caller != verifier)) | |
28 | + | then if ((getExtValueItemWhiteListStatus(caller) != MODERATOR)) | |
29 | + | then true | |
30 | + | else (getExtValueItemWhiteListStatus(caller) != ADMIN) | |
31 | + | else false) | |
32 | + | then throw("only Kolin ADMINS or MODERATORS can manage the whitelist") | |
33 | + | else if (if (if (if (if (if ((status != WHITELISTED)) | |
34 | + | then true | |
35 | + | else (status != BLACKLISTED)) | |
36 | + | then true | |
37 | + | else (status != INVITED)) | |
38 | + | then true | |
39 | + | else (status != MODERATOR)) | |
40 | + | then true | |
41 | + | else (status != ADMIN)) | |
42 | + | then true | |
43 | + | else (status != SPENDINVITE)) | |
44 | + | then throw("status not recognised") | |
45 | + | else WriteSet([DataEntry(getExtValueItemWhiteListStatus(account), status)]) | |
46 | + | } | |
47 | + | ||
48 | + | ||
49 | + | @Verifier(i) | |
50 | + | func verify () = match i { | |
51 | + | case o: SetScriptTransaction => | |
52 | + | sigVerify(i.proofs[0], i.bodyBytes, base58'6KMPZeYtPd2PGkCrTio3BhGqeQrrtyQN9VQLp1Lm5PaL') | |
53 | + | case _ => | |
54 | + | false | |
55 | + | } | |
56 | + |
github/deemru/w8io/026f985 15.23 ms ◑