tx · Cf21EbjabyWYP8VkKNAkJEu8CGGjho5CeSV7S9K9N4Bv 3N3r2jwQeJAdmxAjMu6hCEurGCBmJ8FebEQ: -0.01000000 Waves 2019.10.21 13:21 [729715] smart account 3N3r2jwQeJAdmxAjMu6hCEurGCBmJ8FebEQ > SELF 0.00000000 Waves
{ "type": 13, "id": "Cf21EbjabyWYP8VkKNAkJEu8CGGjho5CeSV7S9K9N4Bv", "fee": 1000000, "feeAssetId": null, "timestamp": 1571653117830, "version": 1, "sender": "3N3r2jwQeJAdmxAjMu6hCEurGCBmJ8FebEQ", "senderPublicKey": "C5hbduf7Vf1VsgoL5UdbMhcH8nZFF6PbBQbRJNmiNzQ", "proofs": [ "4wWRxZoH1P83TNKjqSKpoGq5mxEtrLyBc5pwrREyeyQcSJZi2KrCoDb8S5Z48w3siS7wje6N6BtDSCDdzXFMEtQc" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEBAAAAAQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABAAAADnZvdGVyUHVibGljS2V5BAAAAA1hbGVrc2VpUHViS2V5AQAAACDs7BraXoS3nx1pKZdsnG0EThqhjZB+UPTCke2+pvunPgQAAAAKYW5uYVB1YktleQEAAAAgMPNfy92G1cnOJ64hdBjyi4WifVVtzZ3+xHxAegj1Ux4DAwkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAADWFsZWtzZWlQdWJLZXkJAQAAAAIhPQAAAAIFAAAADnZvdGVyUHVibGljS2V5BQAAAAphbm5hUHViS2V5BwcGAAAAAQAAAAFpAQAAAAR2b3RlAAAAAQAAAAd0aGVWb3RlAwkBAAAAASEAAAABCQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAABu0JLRiyDQvdC1INC80L7QttC10YLQtSDQs9C+0LvQvtGB0L7QstCw0YLRjCwg0YLQsNC6INC60LDQuiDQstCw0YEg0L3QtdGCINCyINGB0L/QuNGB0LrQtSDQs9C+0LvQvtGB0YPRjtGJ0LjRhSEEAAAAD2RhdGFGcm9tU3RvcmFnZQkABBoAAAACBQAAAAR0aGlzCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAQAAAAlpc0RlZmluZWQAAAABBQAAAA9kYXRhRnJvbVN0b3JhZ2UJAAACAAAAAQIAAABh0JLRiyDRg9C20LUg0LPQvtC70L7RgdC+0LLQsNC70LghINCf0L7QstGC0L7RgNC+0L3QvtC1INCz0L7Qu9C+0YHQvtCy0LDQvdC40LUg0LfQsNC/0YDQtdGJ0LXQvdC+LgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAAB3RoZVZvdGUFAAAAA25pbAAAAACrRoST", "chainId": 84, "height": 729715, "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 alekseiPubKey = base58'Gwr2ggXVEr5vgFzwGaB4YaTzRL3iWfi4UYcxit2xJXTj' | |
6 | + | let annaPubKey = base58'4J5p2n1BYZKduuWGS3o7R9gwo1ainhZiRJxQEhkdiyYq' | |
7 | + | if (if ((voterPublicKey != alekseiPubKey)) | |
8 | + | then (voterPublicKey != annaPubKey) | |
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("Вы не можете голосовать, так как вас нет в списке голосующих!") | |
18 | + | else { | |
19 | + | let dataFromStorage = getInteger(this, toBase58String(i.callerPublicKey)) | |
20 | + | if (isDefined(dataFromStorage)) | |
21 | + | then throw("Вы уже голосовали! Повтороное голосование запрещено.") | |
22 | + | else WriteSet([DataEntry(toBase58String(i.callerPublicKey), theVote)]) | |
23 | + | } | |
24 | + | ||
25 | + |
github/deemru/w8io/169f3d6 14.46 ms ◑