tx · 4uHDb3EuvF2Rm3NezEQv6EdJNyRYCDQPcQFMtz6YxDB6 3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w: -0.01400000 Waves 2019.11.18 17:52 [770710] smart account 3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w > SELF 0.00000000 Waves
{ "type": 13, "id": "4uHDb3EuvF2Rm3NezEQv6EdJNyRYCDQPcQFMtz6YxDB6", "fee": 1400000, "feeAssetId": null, "timestamp": 1574088627687, "version": 1, "sender": "3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w", "senderPublicKey": "99YVxEETpC8daMuVD1HFjz4KEx66SMyjjnCtNmptDa2u", "proofs": [ "3HBJ681dE2hbM52BvPZgRzEpapUgiyAp9ttdNnDzaMaduA3EPJfPKuabHBoYJ83VRPkwQG6UUWKoJ1abvj4JajPD" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIICAAAAAwBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABAAAAB2FjY291bnQJAAEsAAAAAgIAAAAQdmVyaWZpZXJfc3RhdHVzXwUAAAAHYWNjb3VudAEAAAAeZ2V0RXh0VmFsdWVJdGVtV2hpdGVMaXN0U3RhdHVzAAAAAQAAAAZzdGF0dXMFAAAABnN0YXR1cwAAAAAIdmVyaWZpZXICAAAAIzNOQ0tvRlF4UmY3enNETmJpdkxGdzFvSjd5OHFKekxtRXM0AAAAABR0aGlzQWRkcmVzc1B1YmxpY0tleQEAAAAgeQ3CE9gMIb37oMo9b2d/nRpvVmKT4DiFAWcrnu2xIwIAAAAAC1dISVRFTElTVEVEAgAAAAtXSElURUxJU1RFRAAAAAALQkxBQ0tMSVNURUQCAAAAC0JMQUNLTElTVEVEAAAAAAdJTlZJVEVEAgAAAAdJTlZJVEVEAAAAABBJTlZJVEVETU9ERVJBVE9SAgAAABBJTlZJVEVETU9ERVJBVE9SAAAAAAxJTlZJVEVEQURNSU4CAAAADElOVklURURBRE1JTgAAAAAL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XN0YXR1cyBub3QgcmVjb2duaXNlZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABBQAAAAdhY2NvdW50BQAAAAZzdGF0dXMFAAAAA25pbAAAAAEAAAABaQEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAABaQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXMFAAAAByRtYXRjaDAJAAH0AAAAAwkAAZEAAAACCAUAAAABaQAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAFpAAAACWJvZHlCeXRlcwgFAAAAAWkAAAAPc2VuZGVyUHVibGljS2V5B6fFC5o=", "chainId": 84, "height": 770710, "spentComplexity": 0 } View: original | compacted Prev: 2u9aiPHfkxQk28ini5g15xLz7RpUmxAzb1PBfBioFv23 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | ||
9 | 9 | ||
10 | 10 | let verifier = "3NCKoFQxRf7zsDNbivLFw1oJ7y8qJzLmEs4" | |
11 | + | ||
12 | + | let thisAddressPublicKey = base58'99YVxEETpC8daMuVD1HFjz4KEx66SMyjjnCtNmptDa2u' | |
11 | 13 | ||
12 | 14 | let WHITELISTED = "WHITELISTED" | |
13 | 15 | ||
56 | 58 | } | |
57 | 59 | ||
58 | 60 | ||
61 | + | @Verifier(i) | |
62 | + | func verify () = match i { | |
63 | + | case s: SetScriptTransaction => | |
64 | + | sigVerify(i.proofs[0], i.bodyBytes, i.senderPublicKey) | |
65 | + | case _ => | |
66 | + | false | |
67 | + | } | |
68 | + |
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 | + | ||
12 | + | let thisAddressPublicKey = base58'99YVxEETpC8daMuVD1HFjz4KEx66SMyjjnCtNmptDa2u' | |
11 | 13 | ||
12 | 14 | let WHITELISTED = "WHITELISTED" | |
13 | 15 | ||
14 | 16 | let BLACKLISTED = "BLACKLISTED" | |
15 | 17 | ||
16 | 18 | let INVITED = "INVITED" | |
17 | 19 | ||
18 | 20 | let INVITEDMODERATOR = "INVITEDMODERATOR" | |
19 | 21 | ||
20 | 22 | let INVITEDADMIN = "INVITEDADMIN" | |
21 | 23 | ||
22 | 24 | let SPENDINVITE = "SPEND_INVITE" | |
23 | 25 | ||
24 | 26 | let ADMIN = "ADMIN" | |
25 | 27 | ||
26 | 28 | let MODERATOR = "MODERATOR" | |
27 | 29 | ||
28 | 30 | @Callable(i) | |
29 | 31 | func setstatus (account,status) = { | |
30 | 32 | let caller = toBase58String(i.caller.bytes) | |
31 | 33 | if (if ((caller != verifier)) | |
32 | 34 | then if ((getExtValueItemWhiteListStatus(caller) != MODERATOR)) | |
33 | 35 | then true | |
34 | 36 | else (getExtValueItemWhiteListStatus(caller) != ADMIN) | |
35 | 37 | else false) | |
36 | 38 | then throw("only Kolin ADMINS or MODERATORS can manage the whitelist") | |
37 | 39 | else if (if ((caller != verifier)) | |
38 | 40 | then if (if (if (if (if (if (if ((status != WHITELISTED)) | |
39 | 41 | then true | |
40 | 42 | else (status != BLACKLISTED)) | |
41 | 43 | then true | |
42 | 44 | else (status != INVITED)) | |
43 | 45 | then true | |
44 | 46 | else (status != INVITEDMODERATOR)) | |
45 | 47 | then true | |
46 | 48 | else (status != INVITEDADMIN)) | |
47 | 49 | then true | |
48 | 50 | else (status != MODERATOR)) | |
49 | 51 | then true | |
50 | 52 | else (status != ADMIN)) | |
51 | 53 | then true | |
52 | 54 | else (status != SPENDINVITE) | |
53 | 55 | else false) | |
54 | 56 | then throw("status not recognised") | |
55 | 57 | else WriteSet([DataEntry(getExtKeyItemWhiteListStatus(account), status)]) | |
56 | 58 | } | |
57 | 59 | ||
58 | 60 | ||
61 | + | @Verifier(i) | |
62 | + | func verify () = match i { | |
63 | + | case s: SetScriptTransaction => | |
64 | + | sigVerify(i.proofs[0], i.bodyBytes, i.senderPublicKey) | |
65 | + | case _ => | |
66 | + | false | |
67 | + | } | |
68 | + |
github/deemru/w8io/026f985 23.86 ms ◑