tx · 2u9aiPHfkxQk28ini5g15xLz7RpUmxAzb1PBfBioFv23 3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w: -0.01400000 Waves 2019.11.18 13:29 [770451] smart account 3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w > SELF 0.00000000 Waves
{ "type": 13, "id": "2u9aiPHfkxQk28ini5g15xLz7RpUmxAzb1PBfBioFv23", "fee": 1400000, "feeAssetId": null, "timestamp": 1574072998212, "version": 1, "sender": "3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w", "senderPublicKey": "99YVxEETpC8daMuVD1HFjz4KEx66SMyjjnCtNmptDa2u", "proofs": [ "5Yx11EXKydjD34LDdraGH79XRcjx644P9ivfYcA4GURZmVBm1CVpeWUV6KDqU3E72QC2516smAqjWfQFwtFaXFDS" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIICAAAAAsBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABAAAAB2FjY291bnQJAAEsAAAAAgIAAAAQdmVyaWZpZXJfc3RhdHVzXwUAAAAHYWNjb3VudAEAAAAeZ2V0RXh0VmFsdWVJdGVtV2hpdGVMaXN0U3RhdHVzAAAAAQAAAAZzdGF0dXMFAAAABnN0YXR1cwAAAAAIdmVyaWZpZXICAAAAIzNOQ0tvRlF4UmY3enNETmJpdkxGdzFvSjd5OHFKekxtRXM0AAAAAAtXSElURUxJU1RFRAIAAAALV0hJVEVMSVNURUQAAAAAC0JMQUNLTElTVEVEAgAAAAtCTEFDS0xJU1RFRAAAAAAHSU5WSVRFRAIAAAAHSU5WSVRFRAAAAAAQSU5WSVRFRE1PREVSQVRPUgIAAAAQSU5WSVRFRE1PREVSQVRPUgAAAAAMSU5WSVRFREFETUlOAgAAAAxJTlZJVEVEQURNSU4AAAAAC1NQRU5ESU5WSVRFAgAAAAxTUEVORF9JTlZJVEUAAAAABUFETUlOAgAAAAVBRE1JTgAAAAAJTU9ERVJBVE9SAgAAAAlNT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QAAAAIJAQAAABxnZXRFeHRLZXlJdGVtV2hpdGVMaXN0U3RhdHVzAAAAAQUAAAAHYWNjb3VudAUAAAAGc3RhdHVzBQAAAANuaWwAAAAAXf5afQ==", "chainId": 84, "height": 770451, "spentComplexity": 0 } View: original | compacted Prev: 9TijVqSoSJootULjwxaeE4pprQv4i6ZUUxkmgMqVnm8f Next: 4uHDb3EuvF2Rm3NezEQv6EdJNyRYCDQPcQFMtz6YxDB6 Diff:
Old | New | Differences | |
---|---|---|---|
35 | 35 | else false) | |
36 | 36 | then throw("only Kolin ADMINS or MODERATORS can manage the whitelist") | |
37 | 37 | else if (if ((caller != verifier)) | |
38 | - | then if (if (if (if (if ((status != WHITELISTED)) | |
38 | + | then if (if (if (if (if (if (if ((status != WHITELISTED)) | |
39 | 39 | then true | |
40 | 40 | else (status != BLACKLISTED)) | |
41 | 41 | then true | |
42 | 42 | else (status != INVITED)) | |
43 | + | then true | |
44 | + | else (status != INVITEDMODERATOR)) | |
45 | + | then true | |
46 | + | else (status != INVITEDADMIN)) | |
43 | 47 | then true | |
44 | 48 | else (status != MODERATOR)) | |
45 | 49 | then true |
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 = "WHITELISTED" | |
13 | 13 | ||
14 | 14 | let BLACKLISTED = "BLACKLISTED" | |
15 | 15 | ||
16 | 16 | let INVITED = "INVITED" | |
17 | 17 | ||
18 | 18 | let INVITEDMODERATOR = "INVITEDMODERATOR" | |
19 | 19 | ||
20 | 20 | let INVITEDADMIN = "INVITEDADMIN" | |
21 | 21 | ||
22 | 22 | let SPENDINVITE = "SPEND_INVITE" | |
23 | 23 | ||
24 | 24 | let ADMIN = "ADMIN" | |
25 | 25 | ||
26 | 26 | let MODERATOR = "MODERATOR" | |
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func setstatus (account,status) = { | |
30 | 30 | let caller = toBase58String(i.caller.bytes) | |
31 | 31 | if (if ((caller != verifier)) | |
32 | 32 | then if ((getExtValueItemWhiteListStatus(caller) != MODERATOR)) | |
33 | 33 | then true | |
34 | 34 | else (getExtValueItemWhiteListStatus(caller) != ADMIN) | |
35 | 35 | else false) | |
36 | 36 | then throw("only Kolin ADMINS or MODERATORS can manage the whitelist") | |
37 | 37 | else if (if ((caller != verifier)) | |
38 | - | then if (if (if (if (if ((status != WHITELISTED)) | |
38 | + | then if (if (if (if (if (if (if ((status != WHITELISTED)) | |
39 | 39 | then true | |
40 | 40 | else (status != BLACKLISTED)) | |
41 | 41 | then true | |
42 | 42 | else (status != INVITED)) | |
43 | + | then true | |
44 | + | else (status != INVITEDMODERATOR)) | |
45 | + | then true | |
46 | + | else (status != INVITEDADMIN)) | |
43 | 47 | then true | |
44 | 48 | else (status != MODERATOR)) | |
45 | 49 | then true | |
46 | 50 | else (status != ADMIN)) | |
47 | 51 | then true | |
48 | 52 | else (status != SPENDINVITE) | |
49 | 53 | else false) | |
50 | 54 | then throw("status not recognised") | |
51 | 55 | else WriteSet([DataEntry(getExtKeyItemWhiteListStatus(account), status)]) | |
52 | 56 | } | |
53 | 57 | ||
54 | 58 |
github/deemru/w8io/026f985 26.95 ms ◑