tx · 5rspftLgfryyZ85F4DZQw9TgAmhp98iB64KFkE9tWXzf 3MxyWS6z1jidvkbvWB5uKo1dVSjSKF3CNpb: -0.01000000 Waves 2019.07.27 11:21 [604211] smart account 3MxyWS6z1jidvkbvWB5uKo1dVSjSKF3CNpb > SELF 0.00000000 Waves
{ "type": 13, "id": "5rspftLgfryyZ85F4DZQw9TgAmhp98iB64KFkE9tWXzf", "fee": 1000000, "feeAssetId": null, "timestamp": 1564215700795, "version": 1, "sender": "3MxyWS6z1jidvkbvWB5uKo1dVSjSKF3CNpb", "senderPublicKey": "98PDAGMzrPZTNGHzD5LqmPLe73U11qzTyzBy7muUzN9y", "proofs": [ "5xQxvbXRAcc1vsVqEjh48KRUikTLfxiASH3n2ejntiG3SKRdM35AxT91FhU9M99yGKa6M4Mw5gyHWyF3utEecu7n" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABR2b3RlcklzQWxsb3dlZFRvVm90ZQAAAAEAAAAOdm90ZXJQdWJsaWNLZXkEAAAADkRzY2h1bmdlUHViS2V5AQAAACBc7XDw57DhgYYO/aqPMKO4zKmcKjJ8d4kjhVnEFt23TAQAAAALU3VubnlQdWJLZXkBAAAAINiJTP0QWNEVL+adQjsJ9hvAec4d9p+0JKiYLtsbrgBeAwMJAQAAAAIhPQAAAAIFAAAADnZvdGVyUHVibGljS2V5BQAAAA5Ec2NodW5nZVB1YktleQkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAAC1N1bm55UHViS2V5BwcGAAAAAQAAAAFpAQAAAAR2b3RlAAAAAQAAAAd0aGVWb3RlAwkBAAAAASEAAAABCQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAAA7WW91IGNhbiBub3Qgdm90ZSBiZWNhdXNlIHlvdSBhcmUgbm90IGluIHRoZSBsaXN0IG9mIHZvdGVycyEEAAAAD2RhdGFGcm9tU3RvcmFnZQkABBoAAAACBQAAAAR0aGlzCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAQAAAAlpc0RlZmluZWQAAAABBQAAAA9kYXRhRnJvbVN0b3JhZ2UJAAACAAAAAQIAAAA+WW91IGhhdmUgYWxyZWFkeSB2b3RlZCEgVm90aW5nIHRoZSBzZWNvbmQgdGltZSBpcyBub3QgYWxsb3dlZC4JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAd0aGVWb3RlBQAAAANuaWwAAAAAhWHdew==", "chainId": 84, "height": 604211, "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 voterIsAllowedToVote (voterPublicKey) = { | |
5 | + | let DschungePubKey = base58'7FkW8z8wJe5XYLA3NAN3Gesev94snUHpMyDUeWv1HiEw' | |
6 | + | let SunnyPubKey = base58'FaGVYhxi3Erstea1wDzux8QzQXG1Lfn7aU5GWWZX8kaZ' | |
7 | + | if (if ((voterPublicKey != DschungePubKey)) | |
8 | + | then (voterPublicKey != SunnyPubKey) | |
9 | + | else false) | |
10 | + | then false | |
11 | + | else true | |
12 | + | } | |
13 | + | ||
14 | + | ||
15 | + | @Callable(i) | |
16 | + | func vote (theVote) = if (!(voterIsAllowedToVote(i.callerPublicKey))) | |
17 | + | then throw("You can not vote because you are not in the list of voters!") | |
18 | + | else { | |
19 | + | let dataFromStorage = getInteger(this, toBase58String(i.callerPublicKey)) | |
20 | + | if (isDefined(dataFromStorage)) | |
21 | + | then throw("You have already voted! Voting the second time is not allowed.") | |
22 | + | else WriteSet([DataEntry(toBase58String(i.callerPublicKey), theVote)]) | |
23 | + | } | |
24 | + | ||
25 | + |
github/deemru/w8io/169f3d6 22.33 ms ◑