tx · Ekk1gtmCruqcnSTWQg6wKW1uNMqSZiSX7FykDENvAeEv 3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w: -0.01400000 Waves 2019.09.25 20:37 [692169] smart account 3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w > SELF 0.00000000 Waves
{ "type": 13, "id": "Ekk1gtmCruqcnSTWQg6wKW1uNMqSZiSX7FykDENvAeEv", "fee": 1400000, "feeAssetId": null, "timestamp": 1569432995506, "version": 1, "sender": "3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w", "senderPublicKey": "99YVxEETpC8daMuVD1HFjz4KEx66SMyjjnCtNmptDa2u", "proofs": [ "4NJT8CdVNBFQ8ZaBGFTW7cKKc1NeacD15FtAqUXdxgLhvGaWDCta4PcD7u2exF4nu4x7rRHoQT6wwXTiDLRMiKvS" ], "script": "base64:AAIDAAAAAAAAAAAAAAAJAQAAABxnZXRFeHRLZXlJdGVtV2hpdGVMaXN0U3RhdHVzAAAAAQAAAAdhY2NvdW50CQABLAAAAAICAAAAEHZlcmlmaWVyX3N0YXR1c18FAAAAB2FjY291bnQBAAAAHmdldEV4dFZhbHVlSXRlbVdoaXRlTGlzdFN0YXR1cwAAAAEAAAAGc3RhdHVzBQAAAAZzdGF0dXMAAAAACHZlcmlmaWVyAgAAACMzTkNLb0ZReFJmN3pzRE5iaXZMRncxb0o3eThxSnpMbUVzNAAAAAALV0hJVEVMSVNURUQCAAAACnJlZ2lzdGVyZWQAAAAAC0JMQUNLTElTVEVEAgAAAAtibGFja2xpc3RlZAAAAAAHSU5WSVRFRAIAAAAHaW52aXRlZAAAAAALU1BFTkRJTlZJVEUCAAAADHNwZW5kX2ludml0ZQAAAAAJTU9ERVJBVE9SAgAAAAltb2RlcmF0b3IAAAAABUFETUlOAgAAAAVhZG1pbgAAAAEAAAABaQEAAAAJc2V0c3RhdHVzAAAAAgAAAAdhY2NvdW50AAAABnN0YXR1cwQAAAAGY2FsbGVyCQACWAAAAAEICAUAA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4i6ZUUxkmgMqVnm8f Diff:
Old | New | Differences | |
---|---|---|---|
44 | 44 | else (status != SPENDINVITE) | |
45 | 45 | else false) | |
46 | 46 | then throw("status not recognised") | |
47 | - | else WriteSet([DataEntry( | |
47 | + | else WriteSet([DataEntry(getExtKeyItemWhiteListStatus(account), status)]) | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getExtKeyItemWhiteListStatus (account) = ("verifier_status_" + account) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func getExtValueItemWhiteListStatus (status) = status | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | let verifier = "3NCKoFQxRf7zsDNbivLFw1oJ7y8qJzLmEs4" | |
11 | 11 | ||
12 | 12 | let WHITELISTED = "registered" | |
13 | 13 | ||
14 | 14 | let BLACKLISTED = "blacklisted" | |
15 | 15 | ||
16 | 16 | let INVITED = "invited" | |
17 | 17 | ||
18 | 18 | let SPENDINVITE = "spend_invite" | |
19 | 19 | ||
20 | 20 | let MODERATOR = "moderator" | |
21 | 21 | ||
22 | 22 | let ADMIN = "admin" | |
23 | 23 | ||
24 | 24 | @Callable(i) | |
25 | 25 | func setstatus (account,status) = { | |
26 | 26 | let caller = toBase58String(i.caller.bytes) | |
27 | 27 | if (if ((caller != verifier)) | |
28 | 28 | then if ((getExtValueItemWhiteListStatus(caller) != MODERATOR)) | |
29 | 29 | then true | |
30 | 30 | else (getExtValueItemWhiteListStatus(caller) != ADMIN) | |
31 | 31 | else false) | |
32 | 32 | then throw("only Kolin ADMINS or MODERATORS can manage the whitelist") | |
33 | 33 | else if (if ((caller != verifier)) | |
34 | 34 | then if (if (if (if (if ((status != WHITELISTED)) | |
35 | 35 | then true | |
36 | 36 | else (status != BLACKLISTED)) | |
37 | 37 | then true | |
38 | 38 | else (status != INVITED)) | |
39 | 39 | then true | |
40 | 40 | else (status != MODERATOR)) | |
41 | 41 | then true | |
42 | 42 | else (status != ADMIN)) | |
43 | 43 | then true | |
44 | 44 | else (status != SPENDINVITE) | |
45 | 45 | else false) | |
46 | 46 | then throw("status not recognised") | |
47 | - | else WriteSet([DataEntry( | |
47 | + | else WriteSet([DataEntry(getExtKeyItemWhiteListStatus(account), status)]) | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 |
github/deemru/w8io/169f3d6 32.88 ms ◑